celestial-astrology
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.
The package provides immutable birth records and modern time resolution, requested chart configuration, tropical natal chart calculation, chart results and text output, an independent knowledge catalog, quality checks, and bilingual API documentation. See Contributing to run the checks.
New in 0.2.0 (in development):
- Static cross-chart aspects between two natal charts, retaining both source charts and distinct left/right objects, without applying/separating labels.
ashmand_sign_group(Sign.ARIES)queries the twelve signs' four groups in Ashmand's 1822 edition. See the source and lookup example.
Installation follows the astronomy dependency: celestial-calendar 0.8.0 publishes wheels for Linux x86_64 and aarch64, macOS 14+ arm64 and Windows amd64, and no source distribution. On any other platform this package cannot be installed, and knowledge browsing is not available either.
Install a release
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.
This checkout prepares 0.2.0. To try the candidate now, install from source. After 0.2.0 is published on PyPI, use the commands below. The examples show output from 0.2.0.
Linux/macOS (replace python3.14 with your supported Python version):
python3.14 -m venv .venv
.venv/bin/python -m pip install "celestial-astrology==0.2.0"
Windows PowerShell:
py -3.14 -m venv .venv
.venv\Scripts\python.exe -m pip install "celestial-astrology==0.2.0"
Runtime dependencies remain exactly pinned to celestial-calendar==0.8.0 and
tzdata==2026.5. This can conflict with applications requiring another version.
See the release notes.
Install from source
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. 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; it is not an interactive transcript.
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.provenance.astrology_version)
print(chart.resolved.utc.isoformat())
for placement in chart.placements:
print(f"{placement.identity.value}: {placement.sign.value}")
Output:
0.2.0
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.
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
Browse the complete catalog or public API. The shared documentation search may return either language; Chinese queries use character pairs, not semantic matching or dictionary segmentation.
First release
The first target is a modern tropical, geocentric natal chart from a known birth time and location:
- Preserve the birth record, resolve its timezone explicitly, and retain the resulting time scales and calculation provenance.
- Compute the Sun, Moon, eight planets, and explicitly selected lunar nodes.
- Support Whole Sign, Equal, and Placidus houses, with explicit failures where a requested geometry is undefined.
- Derive signs, two-dimensional house placement (longitude only, without object latitude), and the five major aspects with configurable orbs and local applying/separating status.
- Return immutable structured results and a text table, retaining inputs, configuration, astronomical values and model identities in memory.
Positions, axes, cusps, signs, house placement, aspects and text output are implemented. Chart persistence is removed in the current source; see the release notes for the difference from the published v0.1.0 API.
See the v0.1.0 milestone for delivery tasks and acceptance criteria.
Design boundaries
- Repository structure and calculation boundaries
- Knowledge organization and bilingual documentation
- Development and review conventions
Project guides and public reference documentation are provided in Chinese and English. Both languages refer to the same identifiers, executable rules, and source records. Quotations retain their original language; translations are identified as translations.
Later work
- Techniques and presentation: transits 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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| celestial_astrology-0.2.0.tar.gz | 352.8 kB | With provenance | Details for celestial_astrology-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| celestial_astrology-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for celestial_astrology-0.2.0-py3-none-any.whl |
Total release size: 427.4 kB
Release files / celestial_astrology-0.2.0.tar.gz
| Download URL | celestial_astrology-0.2.0.tar.gz |
|---|---|
| Size | 352.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9542b676484c407756f111193837e88baf52d3dae5fbd1355c0f4fae0f3f6417
|
|
BLAKE2b-256 checksum How to use checksums |
60d74d6cc8e87bf48a59cb920929d6b3b12bf1f7ba4e86c26e7f47187be3afae
|
| 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 Oct 26, 2026.
Transparency logRelease files / celestial_astrology-0.2.0-py3-none-any.whl
| Download URL | celestial_astrology-0.2.0-py3-none-any.whl |
|---|---|
| Size | 74.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36943206cf22ec4576a0cbc79195fa01b6b10ba0aa786f1ff1bb02c9b6432afc
|
|
BLAKE2b-256 checksum How to use checksums |
cf450ef244bbdfb68127d80ba96d7fa14cd3cb861387ec71950896604542e3d9
|
| 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 Oct 26, 2026.
Transparency logSecurity for celestial-astrology 0.2.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.
Attestation for celestial_astrology-0.2.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 Oct 26, 2026.
Transparency logA 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.