The seven ephemeris libraries developers use in 2026, compared for Python, Rust and JavaScript.
Disclosure: French Ephemeris is developed by FreeAstroAPI, the publisher of this guide. Figures link to public sources and were last verified on October 31, 2026.
Quick verdict
| Best for | Library | Why |
|---|---|---|
| Astrology apps in production | French Ephemeris | NASA JPL data, 24 house systems, 46 ayanamsas, thread safe, pyswisseph compatible API, USD 200 commercial licence |
| The long established reference | Swiss Ephemeris | Used by astrology software since 1997, the widest set of features, C core with bindings for most languages |
| Pure Python astrology engine | LibEphemeris | Swiss Ephemeris compatible API written in Python on top of Skyfield, with documented provenance |
| Astronomy in Python | Skyfield | Clean API, JPL data, MIT licence, excellent for observing and satellite work |
| JavaScript and the browser | Astronomy Engine | Small, MIT licence, runs in any browser, about 1 arcminute accuracy |
| Research and scientific pipelines | Astropy | The standard astronomy toolkit in Python, BSD licence |
| Ready made astrology charts | Kerykeion | High level natal charts, aspects and SVG chart drawing out of the box |
Comparison table
| Library | Languages | Licence | Data | Size options | House systems | Ayanamsas | Latest release |
|---|---|---|---|---|---|---|---|
| French Ephemeris | Python, Rust | AGPL-3.0 or USD 200 one time | NASA JPL DE441/DE442 | 8.6 MB with data built in; 2.03 MB mobile set; 69 MB exact JPL pack | 24 | 46 | 1.4.0 (Oct 2026) |
| Swiss Ephemeris / pyswisseph | C, Python, Node.js and more | AGPL or professional licence (CHF 700) | Compressed JPL data | 1.8 MB + about 2.1 MB of data files | 24 | 47 | pyswisseph 2.10.3.2 (Jun 2023) |
| LibEphemeris | Python | AGPL-3.0 | NASA JPL DE440/DE441 via Skyfield | 29 MB + data tiers, from light to over 300 MB | Yes | Yes | 3.2.2 (Oct 2026) |
| Skyfield | Python | MIT | NASA JPL DE files | 0.4 MB + 17 to 33 MB JPL file | No | No | 1.55 (Aug 2026) |
| Astronomy Engine | JavaScript, TypeScript, Python, C, C#, Kotlin | MIT | Analytic models (VSOP87 and others) | 116 KB minified JS, no data | No | No | 2.1.19 (Dec 2023) |
| Astropy | Python | BSD-3-Clause | Built in models or JPL files | 6.7 MB + NumPy and pyerfa | No | No | 8.0.2 (Oct 2026) |
| Kerykeion | Python | AGPL-3.0 | LibEphemeris | 0.9 MB + LibEphemeris and its data | Yes | Yes | 6.0.5 (Oct 2026) |
Two kinds of library sit in this table. Astrology engines (French Ephemeris, Swiss Ephemeris, LibEphemeris, Kerykeion) compute houses, ayanamsas, lunar nodes and Lilith. Astronomy libraries (Skyfield, Astronomy Engine, Astropy) compute positions very well but leave astrology to you. If you are building an astrology app, start with the first group.
Which ephemeris library is the most precise?
We measured it. On October 31, 2026 we asked JPL Horizons, NASA's reference service, for the positions of the Sun, the Moon and the planets on 20 random dates between 1900 and 2100, then computed the same positions with each library and kept the largest gap. All positions are astrometric (ICRF right ascension and declination, geocentric, Terrestrial Time), so every library is compared on the same footing.
| Rank | Library | Sun, Moon, Mercury to Mars | Jupiter to Pluto | Where the positions come from |
|---|---|---|---|---|
| 1 | Skyfield (de440s) | 0.005″ | Matches JPL DE441 | NASA JPL DE440, unchanged |
| 1 | LibEphemeris | 0.005″ | Matches JPL DE441 | NASA JPL DE440/DE441 through Skyfield |
| 1 | French Ephemeris, exact JPL pack | 0.005″ | Matches JPL DE442 | NASA JPL DE442, unchanged |
| 4 | French Ephemeris, built in data | 0.16″ | Matches JPL DE442 | Compact refit of JPL data, shipped in the wheel |
| 5 | Astronomy Engine | 20″ | 20″ | Analytic models |
| 6 | Astropy built in model | 21″ | 90″ (no Pluto) | Analytic planetary theory |
Not measured here:
- Kerykeion computes positions with LibEphemeris, so it inherits LibEphemeris's figures.
- Astropy with JPL files reads the same JPL data as Skyfield through jplephem.
- Swiss Ephemeris compresses the JPL data. The French Ephemeris engine report measures it within 0.006″ of Horizons for years 0 to 1550, against 0.0005″ for French Ephemeris on the same data.
How to read these results:
- The top three are tied for the Sun, the Moon and the inner planets. Libraries that read NASA JPL data unchanged all land within 0.005″ of Horizons, which is about 1/700,000 of a degree.
- For the outer planets, the libraries differ only by JPL edition. Skyfield and LibEphemeris read DE440 and DE441; French Ephemeris reads DE442, JPL's newer edition with an improved fit for Uranus and Neptune. The two editions differ by up to 0.35″ on Uranus and 0.1″ on Neptune. Loaded with the DE442 file, Skyfield agrees with French Ephemeris within 0.002″, so neither library adds error of its own. Which one matches Horizons depends on what you ask it: its Uranus system position follows DE441, its Uranus planet centre agrees with DE442.
- Jupiter, Saturn and Pluto: centre of the planet or of its moon system. JPL's main files give the centre of mass of each planet together with its moons. All three libraries return that by default, which sits 0.05″ to 0.09″ from the planet's own centre. LibEphemeris can download an extra JPL file to return true planet centres.
- French Ephemeris trades a little precision for zero setup. Its built in data works right after
pip install, within 0.16″. Runpython -m frenchephemeris.packs downloadto get JPL's exact numbers. - Analytic models are 1,000 to 10,000 times less precise. Astronomy Engine stayed within 20″, well inside its stated 1 arcminute. Astropy's built in model reached 90″ on Uranus and cannot compute Pluto. Use either with care for exact transit and aspect times: the Moon moves 20″ in about 40 seconds.
How much precision does an astrology app need?
A chart that shows degrees and minutes needs positions within about 1″ to be safe at sign and house boundaries. Every library at rank 1 and Swiss Ephemeris clear that by several orders of magnitude. Precision becomes a deciding factor only for exact event timing (returns, ingresses, eclipses), historical charts far from the present, or scientific work.
How we compared them
- Accuracy: how close positions are to NASA JPL Horizons, the reference used by astronomers.
- Astrology features: house systems, sidereal zodiacs (ayanamsas), nodes, Lilith, fixed stars, eclipses.
- Production readiness: thread safety, speed, packaging, maintenance.
- Licence and price: what you must publish or pay to ship a closed source app or a paid service.
- Language reach: Python, Rust, JavaScript, mobile.
- Size: how much your server image or app bundle grows.
1. French Ephemeris
Best for: astrology apps and APIs in production, and teams leaving pyswisseph.
French Ephemeris is an ephemeris and astrology library written in Rust with Python bindings. It reads NASA JPL DE441 and DE442 data unchanged and adds everything an astrology app needs: 24 house systems, 46 ayanamsas, nodes and Lilith, 8,969 fixed stars (every naked-eye star), Chiron and asteroids, rise and set times, eclipses and occultations.
Its swe_compat module mirrors the pyswisseph API, so existing Swiss Ephemeris code switches with one import:
import frenchephemeris.swe_compat as swe
jd = swe.julday(1990, 5, 17, 14.5) # 17 May 1990, 14:30 UT
cusps, ascmc = swe.houses(jd, 48.8566, 2.3522, b"P") # Paris, Placidus
(lon, lat, dist, speed, *_), _ = swe.calc_ut(jd, swe.MOON, swe.FLG_SPEED)
print(f"Moon {lon:.2f}° Ascendant {ascmc[0]:.2f}°")Strengths
- Within 0.0005″ of JPL Horizons for years 0 to 1550, and every eclipse of NASA's Five Millennium Canon found for years 0 to 2400 (engine report).
- 3.6× faster than pyswisseph on a full chart from Python (15 µs against 55 µs), and about 4.5 million positions per second through the NumPy batch API.
- No global state: safe in FastAPI, Django, Celery and threaded servers.
- Works right after
pip install: years 0 to 2400 are built in. A 2 MB data set covers 1800 to 2400 for mobile and embedded apps. - Commercial licence is USD 200 once per company.
Weaknesses
- New in 2026, so it has a smaller community than Swiss Ephemeris.
- The Rust crate installs from GitHub, not crates.io yet, and there is no official JavaScript or WebAssembly package yet.
- A few rarely used Swiss Ephemeris modes are missing (for example the Vettius Valens ayanamsa).
Licence: AGPL-3.0, or a commercial licence for USD 200 one time per company.
2. Swiss Ephemeris (pyswisseph)
Best for: projects that need the reference implementation most astrology software has used for decades.
Astrodienst's Swiss Ephemeris is a C library first released in 1997. It is built into a large share of desktop and web astrology software, and it has bindings for Python (pyswisseph), Node.js (sweph), PHP, Java and others. Its data files are a compressed version of the JPL ephemerides.
Strengths
- The most complete feature set in astrology: 47 ayanamsas, every classic house system, heliacal events, fictitious bodies.
- Huge user base, so answers to most questions already exist online.
- Bindings for most languages, including Node.js through
sweph.
Weaknesses
- Settings such as the sidereal mode and topocentric position are global to the process, which complicates threaded web servers.
- The last pyswisseph release on PyPI dates from June 2023; a community fork, pysweph, publishes newer builds.
- Its compressed files are within about 0.006″ of JPL Horizons for years 0 to 1550, about 12× further than French Ephemeris on the same data. That gap is far below anything a chart can show.
Licence: AGPL, or the Swiss Ephemeris Professional licence at CHF 700 (Astrodienst price page).
3. LibEphemeris
Best for: Python developers who want a readable, pure Python astrology engine.
LibEphemeris is a Python library built on Skyfield, pyerfa and NASA JPL DE440/DE441. It presents itself as a drop in replacement for pyswisseph and documents the source of every model and coefficient it uses. The current version of Kerykeion runs on it.
Strengths
- Pure Python on the scientific stack, so it is easy to read, debug and step through.
- Strict, published provenance rules for every number it uses.
- Actively developed in 2026.
Weaknesses
- Python only.
- Python code is slower than a compiled core for very large batches; check its benchmarks for your workload.
Licence: AGPL-3.0.
4. Skyfield
Best for: astronomy in Python: where is Mars tonight, when does the ISS pass over, when does the Sun rise.
Skyfield by Brandon Rhodes is one of the most pleasant APIs in scientific Python. It loads the official JPL ephemeris files and handles time scales, observers and satellites with care.
from skyfield.api import load
ts = load.timescale()
planets = load("de421.bsp")
t = ts.utc(1990, 5, 17, 14, 30)
lat, lon, distance = planets["earth"].at(t).observe(planets["mars"]).apparent().ecliptic_latlon()
print(lon.degrees)Strengths
- Clear documentation and a careful, well tested API.
- MIT licence: no obligations for closed source apps.
- JPL data, so positions are as good as the file you load.
Weaknesses
- No house systems, ayanamsas, nodes or Lilith: you would write the astrology layer yourself.
- Ephemeris files are downloaded separately (de421.bsp is 17 MB).
Licence: MIT.
5. Astronomy Engine
Best for: JavaScript and TypeScript apps, including code that runs in the browser.
Astronomy Engine by Don Cross is a small library with the same API in JavaScript, TypeScript, Python, C, C# and Kotlin. It computes positions from analytic models, so it needs no data files at all.
import * as Astronomy from "astronomy-engine";
const date = new Date("1990-05-17T14:30:00Z");
const ecliptic = Astronomy.Ecliptic(Astronomy.GeoVector(Astronomy.Body.Mars, date, true));
console.log(ecliptic.elon);Strengths
- Runs anywhere JavaScript runs, with no native code and no data files.
- MIT licence.
- Rise and set times, moon phases, eclipses and seasons included.
Weaknesses
- Accuracy is about 1 arcminute by design, enough for apps but not for precise timing work.
- No house systems or ayanamsas.
- The last release dates from December 2023.
Licence: MIT.
6. Astropy
Best for: scientific Python pipelines that already use the Astropy ecosystem.
Astropy is the community standard for astronomy in Python. Its coordinates module computes solar system positions from built in models or from JPL files through jplephem.
Strengths
- Rigorous coordinate frames, units and time scales.
- Very large community and long term support.
- BSD licence.
Weaknesses
- Heavy for an app: many dependencies and a slower per call path.
- No astrology features.
Licence: BSD-3-Clause.
7. Kerykeion
Best for: getting a complete natal chart, aspects and an SVG chart drawing with very little code.
Kerykeion is a high level astrology library: you give it a birth date and place and it returns planets, houses, aspects and a ready to display SVG chart. Its current version computes positions with LibEphemeris.
Strengths
- Fastest path from birth data to a drawn chart.
- Synastry, composite charts and reports included.
- Active development.
Weaknesses
- A higher level library: less control over the underlying calculations than a raw ephemeris.
- Python 3.12 or later.
Licence: AGPL-3.0.
Also worth knowing
- flatlib: a traditional astrology library, MIT licence, but its last release is from 2021 and it pins an old pyswisseph (2.08).
- Immanuel: produces readable and JSON chart data on top of pysweph.
- Rust: besides French Ephemeris, the options are thin. The swisseph crate wraps the C library, and the astro crate has not been updated since 2016.
Package and data size
Size matters twice: once for your server image or serverless bundle, and again, much more, inside a mobile app. The figures below are the download sizes published on PyPI and npm on October 31, 2026, plus the data each library needs for planets from 1800 to 2400.
| Library | Package download | Data for 1800 to 2400 | Notes |
|---|---|---|---|
| French Ephemeris | 8.6 MB wheel | Included (years 0 to 2400 built in), or a 2.03 MB mobile set | Optional 69 MB pack holds JPL's exact numbers |
| Swiss Ephemeris (pyswisseph) | 1.8 MB wheel | About 2.1 MB of .se1 files, downloaded separately | Without files it falls back to a lower precision analytic model |
| LibEphemeris | 12.4 MB wheel, plus 17 MB skyfield-data | Separate download by tier; the recommended tier is over 300 MB | A lightweight tier covers 1850 to 2150 |
| Skyfield | 0.4 MB wheel | 17 MB (de421.bsp) or 33 MB (de440s.bsp) | Pick the JPL file that matches your date range |
| Astronomy Engine | 116 KB minified JavaScript (47 KB gzipped) | None | Analytic models, about 1 arcminute accuracy |
| Astropy | 6.7 MB wheel, plus NumPy and pyerfa | Built in models, or JPL files as above | Heaviest dependency tree in this list |
| Kerykeion | 0.9 MB wheel | Inherits LibEphemeris and its data | Also installs Pydantic and requests |
Wheel sizes are for one platform (macOS arm64, or Linux x86_64 for pyswisseph) and vary slightly between platforms.
Mobile app integration (iOS, Android, React Native, Flutter)
There are two ways to put an ephemeris behind a mobile app:
- On a server. Your app calls your own backend or a hosted API. Any library in this guide works, the app stays small, and you can fix calculations without an app store release.
- On the device. The library ships inside the app. Charts work offline and birth data never leaves the phone, which users increasingly ask for. Only compiled or JavaScript libraries can do this.
| Library | Runs on the device? | iOS | Android | React Native | Flutter | Data in the app |
|---|---|---|---|---|---|---|
| French Ephemeris | Yes, Rust core | Build the Rust crate for iOS | Build the Rust crate for Android | Through a native module | Through flutter_rust_bridge | 2.03 MB mobile set |
| Swiss Ephemeris | Yes, C library | Compile the C sources | Compile with the NDK | Through a native module | Through dart:ffi | About 2.1 MB |
| Astronomy Engine | Yes | C version | Kotlin version | JavaScript version | C version through dart:ffi | None |
| LibEphemeris | No, Python | Server only | Server only | Server only | Server only | Not applicable |
| Skyfield | No, Python | Server only | Server only | Server only | Server only | Not applicable |
| Astropy | No, Python | Server only | Server only | Server only | Server only | Not applicable |
| Kerykeion | No, Python | Server only | Server only | Server only | Server only | Not applicable |
What this means in practice:
- For a full astrology app that works offline, French Ephemeris and Swiss Ephemeris are the only two options with houses and ayanamsas. Both need a native build step today: neither publishes an official Swift Package or Android library. French Ephemeris has no other dependencies than two small Rust crates and no global state, which keeps the wrapper simple.
- For sky positions only (moon phases, rise and set, planet visibility), Astronomy Engine is the easiest choice: drop in the Kotlin, C or JavaScript version, with no data files.
- Mind the licence in app stores. An AGPL library inside a distributed app means publishing your app's source under the AGPL. Most store apps buy a commercial licence instead: USD 200 for French Ephemeris, CHF 700 for Swiss Ephemeris. Astronomy Engine's MIT licence has no such obligation.
- For the smallest app and fastest start, keep the calculations on a server or call FreeAstroAPI, which runs on French Ephemeris and returns JSON your app can render.
Which ephemeris library should you choose?
| If you are building | Choose |
|---|---|
| An astrology web app or API in Python | French Ephemeris |
| A closed source commercial astrology product on a budget | French Ephemeris (USD 200) |
| An app already written on pyswisseph | French Ephemeris, by changing one import, or stay on Swiss Ephemeris |
| A pure Python project you want to read end to end | LibEphemeris |
| A natal chart with an SVG drawing in a few lines | Kerykeion |
| A stargazing or satellite app in Python | Skyfield |
| A browser or Node.js app with simple positions | Astronomy Engine |
| An offline iOS or Android astrology app | French Ephemeris (Rust core, 2 MB data) or Swiss Ephemeris (C) |
| A mobile app showing moon phases or planet visibility | Astronomy Engine |
| A research pipeline | Astropy or Skyfield |
| Any of the above without running your own engine | FreeAstroAPI, which runs on French Ephemeris |
FAQ
What is the most accurate ephemeris library?
Libraries that read NASA JPL data unchanged. In our October 2026 measurement against JPL Horizons, Skyfield, LibEphemeris and French Ephemeris (with its exact JPL pack) were tied, all within 0.005″ for the Sun, the Moon and the inner planets. For the outer planets they follow different JPL editions (DE441 or the newer DE442), which differ by up to 0.35″. Swiss Ephemeris compresses the JPL data and stays within about 0.006″. Analytic libraries are far behind: Astronomy Engine within 20″, Astropy's built in model up to 90″.
What is the best free alternative to Swiss Ephemeris?
French Ephemeris and LibEphemeris both offer a pyswisseph style API on NASA JPL data under AGPL-3.0. French Ephemeris is compiled Rust and adds a USD 200 commercial licence; LibEphemeris is pure Python.
Can I use an AGPL ephemeris library in a commercial app?
Yes, if you publish the source code of your app, including for users who only reach it over a network. If you want to keep your code private, buy a commercial licence: USD 200 for French Ephemeris, CHF 700 for Swiss Ephemeris, or use an MIT or BSD library such as Skyfield, Astronomy Engine or Astropy.
Which ephemeris library works in JavaScript?
Astronomy Engine runs in the browser and Node.js with no native code. For astrology features in Node.js, sweph binds the Swiss Ephemeris. You can also call an API such as FreeAstroAPI from any language.
Which ephemeris library is best for mobile apps?
For an astrology app that computes charts offline on the phone, French Ephemeris (Rust core with a 2.03 MB data set for 1800 to 2400) or Swiss Ephemeris (C library with about 2.1 MB of data files). Both need a native build step for iOS and Android. For simple sky positions, Astronomy Engine ships Kotlin, C and JavaScript versions with no data files. Python libraries such as Skyfield, Astropy, LibEphemeris and Kerykeion run on a server behind the app.
Which ephemeris library is the smallest?
Astronomy Engine: 116 KB of minified JavaScript and no data files, at about 1 arcminute accuracy. For full astrology precision, French Ephemeris with its mobile set (2.03 MB of data) and Swiss Ephemeris with its .se1 files (about 2.1 MB) are the smallest.
Which ephemeris library works in Rust?
French Ephemeris has a native Rust core (fe-core, installed from GitHub). The swisseph crate wraps the Swiss Ephemeris C library.
Do I need house systems from my ephemeris library?
Only for astrology. Houses depend on the time and place of birth and are not part of astronomy libraries such as Skyfield, Astropy or Astronomy Engine. French Ephemeris and Swiss Ephemeris include 24 systems, from Placidus and Koch to Whole Sign.