Flatlib vs a hosted astrology API
Flatlib was a tidy Python library for traditional (Hellenistic and medieval) astrology: charts, essential and accidental dignities, almuten, profections and primary directions, built on pyswisseph. Its README now opens with a deprecation notice and points to a successor project, so the question for most teams is what to move to.
Every Flatlib fact below links the page it was read from on .
Honestly
Where Flatlib is the better choice
- You maintain existing code that already uses it and the outputs are trusted. A working, frozen dependency with no network calls is cheaper than a rewrite, as long as you pin everything around it.
- You want to read the method. The code is small and organised by technique - dignities, protocols such as almuten and temperament, primary directions - which makes it a good reference implementation for traditional techniques.
- Traditional Western work specifically: Alcabitus houses by default, essential dignity tables, accidental dignities. These are niche, and few APIs expose them.
Side by side
What you get vs what you build
| Flatlib (self-hosted) | AstroNode API | |
|---|---|---|
| Language / runtime | Python 3, on pyswisseph source | Any language: HTTPS + JSON, OpenAPI 3.1 spec details |
| Install and native build | Builds pyswisseph from source, so needs a C compiler source | Nothing to compile; an API key and an HTTP client details |
| Planet positions | Yes - tropical positions via pyswisseph source | Sidereal and tropical, from Swiss Ephemeris data files details |
| House systems | 14 systems; Alcabitus is the default source | Whole-sign (Vedic), Placidus (KP), five Western systems details |
| Sidereal / ayanamsa | Not documented | Fixed per tradition: Lahiri, KP-Newcomb, tropical details |
| Dashas | Not documented; Western predictives only (directions, profections, returns) source | Vimshottari, Yogini, Char details |
| Divisional charts (vargas) | Not documented | 16 vargas in one call, plus D150 details |
| KP sub-lords | Not documented | Cuspal sub-lord chain, significators, horary 1-249 details |
| Panchang | Not documented | Tithi, nakshatra, yoga, karana, sunrise, muhurta windows details |
| Yogas | Not documented | 55 classical yogas with reasons details |
| Kundli matching | Not documented | Ashtakoot, Dashakoot, Porutham, batch scoring details |
| Ephemeris data you ship | Ships a set of .se1 files inside the package source | None on your side |
| Time zones and historical offsets | Fixed UTC offset per Datetime; no zone lookup source | You send the offset in force at birth; no zone-name lookup details |
| Maintenance signal | Deprecated by its author; repository archived source | Hosted; changes published in the changelog details |
| Stated accuracy | Not documented | Measured in CI vs NASA JPL Horizons: Moon 3.1″, planets ≤ 0.5″ (1900-2050) details |
“Not documented” means the project's own README and docs do not describe it - not that it is impossible to build on top.
On top
What you would still write with Flatlib
- A migration plan. With the project deprecated and archived, any bug you find is yours to patch in a fork, and new Python versions are yours to test against.
- Sidereal support if you need it - no ayanamsa option is documented - and, after that, the whole Vedic layer: dashas, vargas, KP, panchang, yogas, matching.
- Time-zone resolution: a Datetime takes a fixed UTC offset string such as '+00:00', so the historical offset for a birthplace is your problem.
- Modern Western features it never had: SVG rendering, synastry scoring, transit search.
Operations
Running it in production
- Dependency drift. The last PyPI release (0.2.3) pins pyswisseph 2.08.00-1, while the repository's setup.py has moved to 2.10.3.2. Installing from PyPI on a current Python can mean building that old binding from source.
- C compiler required. Its installation guide walks through installing a compiler on Windows and Xcode command-line tools on macOS because pyswisseph is built during install.
- Bundled data. A handful of .se1 files ship inside the package, so the date range you get is whatever those files cover; adding more means managing a data directory yourself.
- No updates are coming. Security fixes in dependencies, new Python releases and upstream ephemeris changes all land on whoever forks it.
- Offsets are fixed numbers. Use the UTC offset finder to get the one in force at a birth, and read the time-zone guide for daylight-saving and wartime traps.
Accuracy
What the numbers say
Flatlib's own docs state no accuracy figure. Positions come from whichever pyswisseph build and data files you install, so the practical answer is the Swiss Ephemeris figure for those files. AstroNode's CI measures the Moon within 3.1″ and every planet within 0.5″ of NASA JPL Horizons from 1900 to 2050.
And
Where an API saves work
- A maintained dependency: if a result is wrong, it is fixed upstream of you and recorded in the changelog.
- No compiler step in your build and no old pinned binding to rebuild.
- Vedic coverage if your product is heading there - dashas, vargas, KP, panchang, yogas and matching.
- Be clear about the gap: AstroNode does not expose Flatlib's traditional techniques (almuten, primary directions, Alcabitus houses). If those are the point, a maintained traditional-astrology library is the better replacement.
Flatlib or an API: quick answers
- What do I need to install to use Flatlib?
- Flatlib: Builds pyswisseph from source, so needs a C compiler. AstroNode API: Nothing to compile; an API key and an HTTP client. Checked 2026-12-01.
- Does Flatlib calculate dashas?
- Flatlib: Not documented; Western predictives only (directions, profections, returns). AstroNode API: Vimshottari, Yogini, Char. Checked 2026-12-01.
- Does Flatlib support KP sub-lords?
- Flatlib: Not documented. AstroNode API: Cuspal sub-lord chain, significators, horary 1-249. Checked 2026-12-01.
- Does Flatlib do kundli matching?
- Flatlib: Not documented. AstroNode API: Ashtakoot, Dashakoot, Porutham, batch scoring. Checked 2026-12-01.
- Does Flatlib handle time zones and historical offsets?
- Flatlib: Fixed UTC offset per Datetime; no zone lookup. AstroNode API: You send the offset in force at birth; no zone-name lookup. Checked 2026-12-01.
Sources
Quoted from Flatlib's own pages
- Language / runtime: “Flatlib is a Python 3 library for Traditional Astrology.” - https://github.com/flatangle/flatlib/blob/master/docs/source/index.rst
- Install and native build: “The compiler is required to build pyswisseph - the Python port of the Swiss Ephemeris.” - https://github.com/flatangle/flatlib/blob/master/docs/source/installation.rst
- Planet positions: “<Sun Pisces +22:47:25 +00:59:51>” - https://github.com/flatangle/flatlib/blob/master/docs/source/index.rst
- House systems: “HOUSES_DEFAULT = HOUSES_ALCABITUS” - https://github.com/flatangle/flatlib/blob/master/flatlib/const.py
- Dashas: “primarydirections.py” - https://github.com/flatangle/flatlib/tree/master/flatlib/predictives
- Ephemeris data you ship: “sepl_18.se1” - https://github.com/flatangle/flatlib/tree/master/flatlib/resources/swefiles
- Time zones and historical offsets: “a date, a time and an UTC Offset.” - https://github.com/flatangle/flatlib/blob/master/flatlib/datetime.py
- Maintenance signal: “This library is no longer supported and will not be updated anymore.” - https://github.com/flatangle/flatlib
- Pinned dependency: “pyswisseph (==2.08.00-1)” - https://pypi.org/pypi/flatlib/json
Flatlib is named only to identify the project. Values were read from public pages on 1 December 2026; projects change, so check their pages before you decide, and tell us if anything here is out of date.
Other options: Swiss Ephemeris · pyswisseph · Kerykeion · PyJHora