Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

LibEphemeris

High-precision astrological ephemerides in Rust and Python, built on NASA/JPL data and published astronomical standards.

Beta: Python 4.0.0b4 · Rust 1.0.0-beta.4 · Python 3.12+ · AGPL-3.0.

Get started · Scientific precision · Italian manual · English manual · Documentation · v4 beta release notes

Kerykeion ecosystem

LibEphemeris is the ephemeris engine in the Kerykeion ecosystem. Use LibEphemeris for low-level calculations, Kerykeion for chart data, aspects and SVG rendering, or the hosted services below for ready-to-use applications.

Astrologer API

For commercial closed-source projects, SaaS products and mobile apps, Astrologer API provides hosted astrology calculations and charts without a local installation. Subscriptions support Kerykeion development.

Subscribe on RapidAPI · API documentation · Coding-agent skill

Built for astrology

Area Features
Charts and transits Planetary positions, speeds, retrograde motion and angular separations
Houses and angles Placidus, Whole Sign, Equal, Koch and other systems; Ascendant, Midheaven and house positions
Sidereal astrology Lahiri, Fagan–Bradley and other ayanamshas, plus a user-defined mode
Lunar points Mean/true nodes, mean/osculating apogee and interpolated apsides, with distinct definitions
Events and returns Longitude crossings, stations, solar-return building blocks, eclipses and occultations
Stars and minor bodies 1,447-star catalog; supported asteroids, centaurs and trans-Neptunian bodies with suitable data
Local sky Topocentric positions, rise/set/transit, refraction, twilight and visibility models

The cookbook turns these primitives into twelve practical recipes. Interpretation and aspect orbs remain application choices.

Scientific precision

  • Ephemerides: NASA/JPL DE440/DE441-family kernels and local LEB coefficient products.
  • Frames: IAU/IERS conventions, SOFA/ERFA-derived components and Vondrák–Capitaine–Wallace long-term precession.
  • Clocks: explicit UTC/UT1/TT handling, Stephenson–Morrison–Hohenkerk (2016) historical Delta-T reconstruction and supported IERS inputs.
  • Validation: identified JPL data, published standards, high-precision mathematical constructions and physical invariants—not output matching as a scientific source.

The source register documents provenance and separates published models from project conventions. Source-incomplete hypothetical models fail rather than return invented orbits.

Numerical precision is not physical accuracy. Source uncertainty, epoch, frame, centre and observer all matter; historical Delta-T can dominate timing uncertainty. The documented migration criteria include 0.001″ for angles and 1 second for events under aligned inputs—not universal accuracy guarantees. See precision and limitations for scope and qualifications. Scientific accuracy concerns the calculated quantities, not astrological interpretation.

Installation

Once published, install the native beta explicitly:

python -m pip install "libephemeris==4.0.0b4"

Before publication, build a local wheel. Wheels include the Rust engine and modern base coefficients; NumPy is the Python runtime dependency. Additional datasets are separate.

Rust applications use libephemeris-core without Python; bundled-data embeds the base image and nbody enables native integration.

First calculation

Tropical positions and Placidus angles for Rome, 8 April 2024 at 12:00 UTC, plus a sidereal Moon position. Runs offline with the bundled data:

import libephemeris as ephe

# Fix the data route and clock policy before calculating.
ephe.set_calc_mode("leb")
ephe.set_precision_tier("base")
ephe.set_network_policy("sealed")
ephe.set_iers_delta_t_enabled(False)
ephe.set_auto_spk_download(False)

# utc_to_jd returns TT first, UT1 second. calc_ut and houses need UT1.
jd_tt, jd_ut1 = ephe.utc_to_jd(2024, 4, 8, 12, 0, 0.0)
signs = (
    "Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo",
    "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces",
)

positions = {}
for body, name in ((ephe.SUN, "Sun"), (ephe.MOON, "Moon"), (ephe.MERCURY, "Mercury")):
    values, returned_flags = ephe.calc_ut(jd_ut1, body, ephe.FLG_SPEED)
    positions[name] = values
    longitude, speed = values[0], values[3]
    sign = signs[int(longitude // 30)]
    motion = "retrograde" if speed < 0 else "direct"
    print(f"{name}: {longitude % 30:.4f}° {sign}, {speed:+.4f}°/day ({motion})")

# houses takes latitude, then east-positive longitude; cusps[0] is house one.
cusps, angles = ephe.houses(jd_ut1, 41.9028, 12.4964, b"P")
print(f"Ascendant: {angles[0]:.4f}°; Midheaven: {angles[1]:.4f}°")

# A separate context keeps the sidereal choice out of the tropical calculations.
sidereal = ephe.EphemerisContext()
sidereal.set_sid_mode(ephe.SIDM_LAHIRI)
moon_sidereal, _ = sidereal.calc_ut(jd_ut1, ephe.MOON, ephe.FLG_SIDEREAL)
print(f"Moon, Lahiri sidereal longitude: {moon_sidereal[0]:.4f}°")

Default positions are apparent and geocentric, in degrees and AU. calc_ut accepts UT1; calc accepts TT. Convert local birth times to UTC first. Python conventions covers units, flags and time-conversion domains. Some house systems are undefined at polar latitudes.

For concurrency, use contexts for observer/sidereal state and configure shared resources before starting workers. Native calls release the GIL but remain synchronous.

Data and offline operation

Mode Route
leb Local coefficients/models; no implicit JPL or Horizons substitution
skyfield Native Rust JPL/SPK reader; historical name, no Python Skyfield backend
auto Configured resources and provider routing
horizons Explicit JPL Horizons network route

sealed blocks calculation-time acquisition. Provision additional resources explicitly:

libephemeris init
libephemeris download auto
libephemeris status -vv

Nominal JPL tiers: 1850–2150 (base), 1550–2650 (medium), −13200–17191 (extended). Check actual per-file/body coverage, including the surrounding interval needed for event searches. A wider tier is not an accuracy guarantee. Record data versions and calculation settings for reproducibility. Data setup · CLI.

Documentation

License

Code: AGPL-3.0. Contributions: CLA. External components retain their own terms; manuals retain their original licensing notice.

For inquiries about private licensing, contact Giacomo Battaglia at kerykeion.astrology@gmail.com. Requests will be evaluated on a case-by-case basis.

Project home: github.com/g-battaglia/libephemeris.

Astrologer Studio

Prefer a browser application? Astrologer Studio uses Kerykeion and Astrologer API for astrological calculations and charts—no Python installation or ephemeris setup required.

Open Astrologer Studio

Metadata

Release files for libephemeris 4.0.0b4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libephemeris 4.0.0b4
File Size Uploaded Provenance Actions
libephemeris-4.0.0b4.tar.gz 15.3 MB Without provenance Details for libephemeris-4.0.0b4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for libephemeris 4.0.0b4
File Actions
libephemeris-4.0.0b4-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for libephemeris-4.0.0b4-cp312-abi3-win_amd64.whl
libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
libephemeris-4.0.0b4-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for libephemeris-4.0.0b4-cp312-abi3-macosx_11_0_arm64.whl

Total release size: 83.9 MB

Release files / libephemeris-4.0.0b4.tar.gz

Download URL libephemeris-4.0.0b4.tar.gz
Size 15.3 MB
Tags Source
SHA-256 checksum
How to use checksums
7f57329a18db1b6d736ba566ba2c556153ed8db4346a89960b807312765bbf45
BLAKE2b-256 checksum
How to use checksums
d9152f5c69407a06f63e3c40d7146499739670818f6011276241f2a223a8ec32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / libephemeris-4.0.0b4-cp312-abi3-win_amd64.whl

Download URL libephemeris-4.0.0b4-cp312-abi3-win_amd64.whl
Size 17.0 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b91bfee8f874a7aea7e21abc4916275aa4211b4d6a322eff0072faf9344614bf
BLAKE2b-256 checksum
How to use checksums
feb936404c187f74fd7f6b6643e5d712a269c9999c2cb84378cdae0919e23538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 17.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
bbe37c610f7336b546f35661a2e84657ed5bb361d786968337dee23c6df8a5ef
BLAKE2b-256 checksum
How to use checksums
11d1c1d39ca251d01f1451e9bf304084f2907ac84b2041b27151251249c7c9ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL libephemeris-4.0.0b4-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 17.3 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
979d439e32c61885a5b3d4e9fd46501d7a8672d71a26dd9b24ad318247d7c7ee
BLAKE2b-256 checksum
How to use checksums
c9b1b0977fca03757420624c0b679f3c96feac377190da17cd4d6a7708e56f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / libephemeris-4.0.0b4-cp312-abi3-macosx_11_0_arm64.whl

Download URL libephemeris-4.0.0b4-cp312-abi3-macosx_11_0_arm64.whl
Size 16.8 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
25fa57856c34c9efa0bd0098237062b99a7169d0e6fb4ff6a2339b06859f0a3c
BLAKE2b-256 checksum
How to use checksums
e16c35b64191bbe634c8181b0a3decb325811cacb3f95eac4dce03bf1ebbe962
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for libephemeris 4.0.0b4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page