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.0b1 · 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.0b1"

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

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

Built distributions (wheels)

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

Total release size: 83.9 MB

Release files / libephemeris-4.0.0b1.tar.gz

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

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

Download URL libephemeris-4.0.0b1-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
0842ab54d18ba2b7ee8cc57d2d2f4c784bfb2834e924ba5a4b9ba64723d486ce
BLAKE2b-256 checksum
How to use checksums
1be56892fbab106d4c3565360334516d94a2967686a3e146310ae971c3f218b1
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.0b1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL libephemeris-4.0.0b1-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
12fa977b7f1d2b469cd7b4307d7485b080ef21389ecf3bba4b4458148f116c6c
BLAKE2b-256 checksum
How to use checksums
6f763562b00bff5c07ad2da467a4fee61fcec45ceb90368cf6d4186c6bc391f2
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.0b1-cp312-abi3-macosx_11_0_arm64.whl

Download URL libephemeris-4.0.0b1-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
5f45f0cd4fc7aa4fc1ff63e2c4cbb96fa3596a6689bd4f7f32ecc3d6b23c07ba
BLAKE2b-256 checksum
How to use checksums
a2c477020e69800efeaa241e83497c40b44624f648c46f4436f8a35c1a8ee58c
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.0b1

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