Subscribe to support and grow the project.
High-precision planetary positions, house systems, eclipses, and more, computed directly from NASA JPL DE440/DE441 ephemerides. API-compatible with Swiss Ephemeris. Pure Python, type-safe, and thread-safe.
Already using pyswisseph? Change
one line, keep everything else.
import swisseph as swe
swe.set_ephe_path("/usr/share/ephe")
jd = swe.julday(2000, 1, 1, 12.0)
pos, flag = swe.calc_ut(jd, swe.SUN, swe.FLG_SPEED)
cusps, ascmc = swe.houses(jd, 41.9, 12.5, b"P") import libephemeris as swe
# No ephemeris path needed
jd = swe.julday(2000, 1, 1, 12.0)
pos, flag = swe.calc_ut(jd, swe.SUN, swe.FLG_SPEED)
cusps, ascmc = swe.houses(jd, 41.9, 12.5, b"P") Every calculation is grounded in the JPL DE440/DE441 planetary ephemerides, the gold standard in positional astronomy, developed by NASA's Jet Propulsion Laboratory for interplanetary navigation. No analytical approximations, no fallback to simplified theories.
Outer planet positions are automatically corrected from system barycenters to physical planet centers using dedicated JPL SPK kernels. Lunar apsides are derived from actual physical distance extrema in JPL data, not truncated analytical series.
Precession and nutation follow IAU 2006/2000A models via pyerfa. Delta T uses Stephenson, Morrison & Hohenkerk (2016) with optional IERS observed data, the current astronomical standard for historical timescale conversion.
Full 1:1 API compatibility with pyswisseph. All `swe_*` functions, `SE_*` constants, and calculation flags work identically. Migrate existing code by changing a single import line. Your calculations gain NASA JPL precision with zero refactoring.
Sun, Moon, Mercury through Pluto with geocentric, heliocentric, and topocentric coordinates. Longitude, latitude, distance, and daily velocities.
Placidus, Koch, Whole Sign, Equal, Regiomontanus, Campanus, Porphyry, Alcabitius, Morinus, and 16 more across 26 character codes. Independently verified against pyswisseph. Includes polar latitude fallback.
Global and local search, Besselian elements, contact points, path geometry, central line, magnitude, obscuration, and Saros/Inex series.
Hipparcos-based catalog with rigorous space motion propagation. Royal stars, Pleiades, zodiacal constellations, and more.
Main-belt asteroids, centaurs (Chiron, Pholus, Nessus), and TNOs (Eris, Sedna, Makemake) via Keplerian model or SPK kernels.
Mean and osculating ascending node. Mean and true Black Moon Lilith. Interpolated apogee and perigee calibrated against DE441.
From modern horoscopes to archeoastronomy. Choose your range.
Three precision tiers map to different JPL kernels. DE440 and DE441 have identical precision; DE441 is
simply the extended-range version.
| Tier | Kernel | Date Range | Size | Use Case |
|---|---|---|---|---|
| Base (default) | de440s.bsp | 1849 – 2150 | ~31 MB | Lightweight web apps, contemporary calculations |
| Medium | de440.bsp | 1550 – 2650 | ~128 MB | General purpose, historical astrology |
| Extended | de441.bsp | 13,200 BC – 17,191 AD | ~3.1 GB | Archeoastronomy, deep historical research |
Keep the familiar Swiss Ephemeris style API for scripts and notebooks. When you're running a web server,
workers, or anything concurrent, use EphemerisContext.
from libephemeris import EphemerisContext, SE_SUN
ctx = EphemerisContext()
ctx.set_topo(12.5, 41.9, 0)
pos, _ = ctx.calc_ut(2451545.0, SE_SUN, 0) Install in seconds, then pick your coverage. The default base tier keeps downloads small and works for modern dates.