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.

Further features include element/modality distributions and natal lunar phase, traditional sign rulers, four statuses and dispositor chains, explicit axis aspects for natal and static cross-chart queries, and cross-chart house overlays and bilingual comparison text. Axes (Ascendant, Midheaven, Descendant and Imum Coeli) participate in aspects only when explicitly selected.

The library also provides:

  • Static cross-chart aspects between two natal charts, retaining both source charts and distinct left/right objects, without applying/separating labels.
  • Exact transit hits over a UTC interval, retaining repeated retrograde hits, native rates and directions.
  • ashmand_sign_group(Sign.ARIES) queries the twelve signs' four groups in Ashmand's 1822 edition. See the source and lookup example.

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

First knowledge lookup

Save this separate script as first_knowledge.py and run it with the same virtual-environment Python. This example finds the Sun by name and alias:

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: fixed-instant transits, orb windows and 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. Each technique needs a named definition, sources, and reference cases before implementation.

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.4.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.4.0
File Size Uploaded Provenance Actions
celestial_astrology-0.4.0.tar.gz 488.7 kB With provenance Details for celestial_astrology-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 614.1 kB

Release files / celestial_astrology-0.4.0.tar.gz

Download URL celestial_astrology-0.4.0.tar.gz
Size 488.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0b4c045e4738e5ec4f79f2460f4f411ab90757324ddfb0380c7b51f769ccd413
BLAKE2b-256 checksum
How to use checksums
b25d45561f0b708069d1e842acdcc49f095a829ab3c58ab9d920131c6cfe8926
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 7, 2026.

Transparency log

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

Download URL celestial_astrology-0.4.0-py3-none-any.whl
Size 125.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76ec936d0a930666ae726935c06aff4c23649476eada342c04691e78e96475f3
BLAKE2b-256 checksum
How to use checksums
250d8ccf25e3d3ac13d26559155c8f14f6aa7cb0109238806ac9218212dcc8ef
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 7, 2026.

Transparency log

Security for celestial-astrology 0.4.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.4.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 7, 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