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 records and text output, an independent knowledge catalog, quality checks, and bilingual API documentation. The astronomy library is imported only when calculation or replay is requested, so importing the package or querying knowledge never initializes it. See Contributing to run the checks.
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.
Linux/macOS (replace python3.14 with your supported Python version):
python3.14 -m venv .venv
.venv/bin/python -m pip install "celestial-astrology==0.1.0"
Windows PowerShell:
py -3.14 -m venv .venv
.venv\Scripts\python.exe -m pip install "celestial-astrology==0.1.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.1.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 record guide
for save/restore/recompute and bilingual text tables.
First knowledge lookup
Save this separate script as first_knowledge.py and run it with the same
virtual-environment Python. It reads the packaged catalog without a chart or
native astronomy initialization; installation still has the platform limits above.
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, a text table, and a versioned serialization that retains inputs, configuration, astronomical values, and model identities.
Positions, axes, cusps, signs, house placement, aspects, text output and versioned records are implemented. Restoration preserves stored results without native astronomy; replay explicitly checks available versions and models.
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
Knowledge browsing is a first-release goal in its own right: readers should be able to find a concept, its rule variants, and its sources without creating a chart or loading the native astronomy library. Source status, applicability, and display eligibility are recorded separately.
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.1.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.1.0.tar.gz | 328.3 kB | With provenance | Details for celestial_astrology-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| celestial_astrology-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for celestial_astrology-0.1.0-py3-none-any.whl |
Total release size: 399.0 kB
Release files / celestial_astrology-0.1.0.tar.gz
| Download URL | celestial_astrology-0.1.0.tar.gz |
|---|---|
| Size | 328.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
198f8bb79354e72d6a4e6255888e1c7043dedb4d5947404f96ddf1f8ceccb303
|
|
BLAKE2b-256 checksum How to use checksums |
6c209e595c0d1bed3ac3540944734c429577129069ab21943486e50b0f41071e
|
| 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 23, 2026.
Transparency logRelease files / celestial_astrology-0.1.0-py3-none-any.whl
| Download URL | celestial_astrology-0.1.0-py3-none-any.whl |
|---|---|
| Size | 70.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1069b1d0419ecdcca68f2218dafdc8871559f747bb9dc03f58a0cf1b9ac6df8c
|
|
BLAKE2b-256 checksum How to use checksums |
4765542d25ced2b55003036f11a942c82cad68c81c0392176d0e70f24b4b0bd2
|
| 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 23, 2026.
Transparency logSecurity for celestial-astrology 0.1.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.1.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 23, 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.