Skip to main content

celestial-astrology

English | 简体中文

A Python library for reproducible Western astrology charts and knowledge queries. It uses celestial-calendar for astronomy and keeps astrological rules, their sources, and their variants in this repository.

Calculate a tropical, geocentric natal chart from a known birth time and location, or query the knowledge catalog without a chart. Start with the examples below; the guides and API reference explain further uses and parameters.

The library provides:

Axes (Ascendant, Midheaven, Descendant and Imum Coeli) participate in aspects only when explicitly selected.

Install a release

The celestial-calendar dependency publishes wheels for Linux x86_64 and aarch64, macOS arm64 and Windows amd64, and no source distribution. On any other platform this package cannot be installed, and knowledge browsing is not available either. Release-specific minimum operating-system versions are recorded in the release notes.

celestial-astrology is the distribution name; the Python import is astrology. Do not install the unrelated PyPI project named astrology.

Use Python 3.11–3.14 on one of the platforms listed above.

Install the latest release on PyPI with the commands below. To try newer source changes, install from source.

Linux/macOS (replace python3.14 with your supported Python version):

python3.14 -m venv .venv
.venv/bin/python -m pip install celestial-astrology

Windows PowerShell:

py -3.14 -m venv .venv
.venv\Scripts\python.exe -m pip install celestial-astrology

Runtime dependencies are exactly pinned. This can conflict with applications requiring another version. See the release notes.

Install from source

This source checkout requires macOS 15+ on arm64; the other platforms listed above are unchanged.

For the exact source revision used by the documentation, use the snapshot command on the documentation home. To install your downloaded or cloned source checkout instead, run these commands from its root. Use a freshly downloaded or cloned copy when switching revisions: files left in build/ can otherwise reappear in the installed package. Installation needs network access for build dependencies and the pinned runtime packages.

Linux/macOS (replace python3.14 with your supported Python version):

python3.14 -m venv .venv
.venv/bin/python -m pip install .

Windows PowerShell:

py -3.14 -m venv .venv
.venv\Scripts\python.exe -m pip install .

These commands install your source checkout. Development checks use uv sync --locked as described in the contribution guide.

First chart

Save this Python script as first_chart.py. Run .venv/bin/python first_chart.py on Linux/macOS, or .venv\Scripts\python.exe first_chart.py in PowerShell. The input has an explicit UTC offset and synthetic coordinates. No aspects are requested.

from datetime import date, time, timedelta
from astrology import (
  BirthRecord,
  Body,
  ChartConfig,
  FixedOffset,
  HouseSystem,
  Location,
  TimePrecision,
  natal_chart,
  prepare_natal_input,
)

record = BirthRecord(
  date(2000, 1, 1),
  time(12, 0),
  FixedOffset(timedelta(0)),
  Location(0, 0),
  TimePrecision.MINUTE,
  {"example": "synthetic"},
)
config = ChartConfig(HouseSystem.WHOLE_SIGN, (Body.SUN, Body.MOON), ())
chart = natal_chart(prepare_natal_input(record), config)
print(chart.resolved.utc.isoformat())
for placement in chart.placements:
  print(f"{placement.identity.value}: {placement.sign.value}")

Output:

2000-01-01T12:00:00+00:00
sun: capricorn
moon: scorpio

Unknown time or missing location is rejected, not replaced with noon or an inferred place. Undefined requested house geometry raises ChartDomainError without a fallback. See the chart guide for admitted domains, and the result guide for structured results and bilingual text tables.

The output lists the resolved UTC instant and the signs of the Sun and Moon. To include other bodies or nodes, set objects when constructing ChartConfig. To calculate aspects, supply orb rules in aspects and select participants with aspect_objects.

Next task Guide
Resolve a local clock or select a repeated time Birth inputs
Select objects, participants and orbs Configuration
Compare two charts Cross-chart aspects and house overlays
Search an interval for exact transits Exact transit hits
Find solar/lunar returns and build their charts Returns

First knowledge lookup

Save this separate script as first_knowledge.py and run it with the same virtual-environment Python. This example retrieves the Sun by its stable ID, then finds the same concept by its alias "Sol":

from astrology import load_catalog

catalog = load_catalog()
print(catalog.concept("body.sun").name.text("en"))
print(catalog.lookup("Sol")[0].identifier)

Output:

Sun
body.sun

The knowledge guide explains lookup, citations and editorial status. Browse the complete catalog for definitions and sources.

Supported chart

The chart supports Whole Sign, Equal and Placidus houses, the Sun, Moon and eight planets, and explicitly selected lunar-node definitions. House placement uses longitude only, without object latitude. The five major aspects use caller-supplied orbs; applying/separating describes local motion, not a future-event prediction. Results keep the four axes separately from the twelve house cusps. Immutable results retain the original input, resolved time scales, configuration, unrounded astronomy and named models.

Design boundaries

Later work

  • Techniques and presentation: orb windows and other planetary returns, relationship charts, tradition-specific rules, additional objects, and chart views.
  • Advanced and historical research: directions, progressions, uncertain birth times, historical inputs, spatial house placement, and sourced interpretation.

These milestones track directions without assigning release dates.

License

MIT covers project code, translations and authored explanations. Historical excerpts retain the reproduction status recorded in their source records.

Metadata

Release files for celestial-astrology 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for celestial-astrology 0.5.0
File Size Uploaded Provenance Actions
celestial_astrology-0.5.0.tar.gz 539.1 kB With provenance Details for celestial_astrology-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for celestial-astrology 0.5.0
File Interpreter ABI Platform Actions
celestial_astrology-0.5.0-py3-none-any.whl Python 3 none any Details for celestial_astrology-0.5.0-py3-none-any.whl

Total release size: 679.0 kB

Release files / celestial_astrology-0.5.0.tar.gz

Download URL celestial_astrology-0.5.0.tar.gz
Size 539.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2cfe29b6847865cde5709dfca9c9597e680d7db6d4b3eb4a70a7d5d3bdb0164d
BLAKE2b-256 checksum
How to use checksums
09a96146fd3f16be051aa6e3a4bf21850e451b33896850ea1553bda032f75bf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / celestial_astrology-0.5.0-py3-none-any.whl

Download URL celestial_astrology-0.5.0-py3-none-any.whl
Size 139.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb694683702a6149585c00aef9716529a4b3d6cd605059f08fa880e2ad565c59
BLAKE2b-256 checksum
How to use checksums
1539c9e2462538aca0bf801d8668e70bafac727aa2982241ee10bedc6983d411
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for celestial-astrology 0.5.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for celestial_astrology-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

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.

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