← Self-hosting vs an API

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 compared with the AstroNode API, checked 1 December 2026
 Flatlib (self-hosted)AstroNode API
Language / runtimePython 3, on pyswisseph sourceAny language: HTTPS + JSON, OpenAPI 3.1 spec details
Install and native buildBuilds pyswisseph from source, so needs a C compiler sourceNothing to compile; an API key and an HTTP client details
Planet positionsYes - tropical positions via pyswisseph sourceSidereal and tropical, from Swiss Ephemeris data files details
House systems14 systems; Alcabitus is the default sourceWhole-sign (Vedic), Placidus (KP), five Western systems details
Sidereal / ayanamsaNot documentedFixed per tradition: Lahiri, KP-Newcomb, tropical details
DashasNot documented; Western predictives only (directions, profections, returns) sourceVimshottari, Yogini, Char details
Divisional charts (vargas)Not documented16 vargas in one call, plus D150 details
KP sub-lordsNot documentedCuspal sub-lord chain, significators, horary 1-249 details
PanchangNot documentedTithi, nakshatra, yoga, karana, sunrise, muhurta windows details
YogasNot documented55 classical yogas with reasons details
Kundli matchingNot documentedAshtakoot, Dashakoot, Porutham, batch scoring details
Ephemeris data you shipShips a set of .se1 files inside the package sourceNone on your side
Time zones and historical offsetsFixed UTC offset per Datetime; no zone lookup sourceYou send the offset in force at birth; no zone-name lookup details
Maintenance signalDeprecated by its author; repository archived sourceHosted; changes published in the changelog details
Stated accuracyNot documentedMeasured 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

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