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.0b2 · Rust 1.0.0-beta.2 · 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.0b2"

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

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

Built distributions (wheels)

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

Total release size: 83.9 MB

Release files / libephemeris-4.0.0b2.tar.gz

Download URL libephemeris-4.0.0b2.tar.gz
Size 15.3 MB
Tags Source
SHA-256 checksum
How to use checksums
e2cb9265e4d305c455fc94d765393f7b3f4d9dde601fc7109cb3ebcdf3103705
BLAKE2b-256 checksum
How to use checksums
b6fc7561af329ba2cf70ade16d32ab7144d325948ed20080e93fc86cc97d8e15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.0b2-cp312-abi3-win_amd64.whl

Download URL libephemeris-4.0.0b2-cp312-abi3-win_amd64.whl
Size 17.0 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a9cfd2984331ce0dec3d561e9bede22ce0c9dbe9acee95fe0eb82f9dc83bea43
BLAKE2b-256 checksum
How to use checksums
a8961a7fc672b48863a3266f5a78a56775ed5ffd88b9a37939586aa5259fd7bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.0b2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libephemeris-4.0.0b2-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
888fa0e025c7bf152e63f4ff693fd7b130115ea9149fb21ac46e985e19e7236c
BLAKE2b-256 checksum
How to use checksums
ff4bc086d8346774b606bd475dce52aacac1c25898e587442f48e8e0d40cfafe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.0b2-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL libephemeris-4.0.0b2-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
dfd65449a72599cf1d1394747aa2f6a5b448f9309cb694ec380aa4a107f543c6
BLAKE2b-256 checksum
How to use checksums
32effab03ad3d6c54ec3ca2f403867c636a1a0ff886a26c5a0abc4196d625a2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.0b2-cp312-abi3-macosx_11_0_arm64.whl

Download URL libephemeris-4.0.0b2-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
4e470f830bc0b2982d67af4b50b9ca3ae4f2e0037a40d3f6e4e9ecd06eb95c8c
BLAKE2b-256 checksum
How to use checksums
00bda7c201eb70ec0e752d7de84521d06a2fed6f948c480c60d5bded0e40d837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.0b2

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