Skip to main content

LibEphemeris

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

Version: Python 4.0.0 · Rust core 1.0.0 · Python 3.12+ · AGPL-3.0.

Get started · Scientific precision · Italian manual · English manual · Documentation · v4 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

After publication, install the native v4 release explicitly:

python -m pip install "libephemeris==4.0.0"

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.0

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.0
File Size Uploaded Provenance Actions
libephemeris-4.0.0.tar.gz 15.3 MB Without provenance Details for libephemeris-4.0.0.tar.gz

Built distributions (wheels)

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

Total release size: 83.9 MB

Release files / libephemeris-4.0.0.tar.gz

Download URL libephemeris-4.0.0.tar.gz
Size 15.3 MB
Tags Source
SHA-256 checksum
How to use checksums
e6e04024cd336d351e4d03b1f09023df0d5adb616d04d33d377f5703cee629db
BLAKE2b-256 checksum
How to use checksums
34b507e2b0f44e64930c93e3ae717a8f1a54655d7dc92e59233d4c5516aa4bf1
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.0-cp312-abi3-win_amd64.whl

Download URL libephemeris-4.0.0-cp312-abi3-win_amd64.whl
Size 17.0 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
092bc5f09beca236b91e0de10cbb3590269a1474369ae3e5d606c28179fa792f
BLAKE2b-256 checksum
How to use checksums
e1599817aca3fec1754cef59f3882eb989409636807a7fa7db5cd1568c84bd89
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.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libephemeris-4.0.0-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
66ede025eb132d4616b586902d47c5500186c8a9ee17ffb97c669ce442012855
BLAKE2b-256 checksum
How to use checksums
bc49f502a411b53628d152c0dde4fd2958fcc0888b548f3c177f8a1cf5637150
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.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL libephemeris-4.0.0-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
2ffded131a8bc76657d812a73ab62664a9dd9fd19db4d67772f06db99ca37226
BLAKE2b-256 checksum
How to use checksums
e8e0ecac603abbf0a4026df4c08d61d018798a746d1c0f0faee8324c0e15827f
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.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL libephemeris-4.0.0-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
2fa6c48ca52446d8dd9c3009d91f58faac1851efd50bd19b1ae6fd0122c02bf1
BLAKE2b-256 checksum
How to use checksums
5acc0b40ee87e5b4b79ebe7c2a1371c875832ee069bec5f30ad526142abf3e7c
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.0

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

4.0.0 This release

5 release files No provenance

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