NOTE: v1.6.x introduces breaking changes from 1.5.x. Please see the v1.6.0 release notes for details.
Immanuel is a Python >= 3.10 package with a focus on speed, simplicity, and precision. Its classes generate chart-centric astrology data - planets, points, signs, houses, aspects, weightings, and more - based on the Swiss Ephemeris, with progressions and dignity scores modeled on astro.com and Astro Gold. This makes it a breeze to generate natal, solar return, progressed, and composite charts, plus create cross-chart aspects for flexible synastries.
Quick Start
Full documentation is available here, but you can get started with full natal chart data in minutes. Simply install Immanuel:
pip install immanuel
Once you've imported Immanuel's chart classes, you will need to hand them a Subject, which takes a date and geographical coordinates. The date can be an ISO-formatted string or a Python datetime instance, and coordinates can be strings or floats.
from immanuel import charts
native = charts.Subject(
date_time="2000-01-01 10:00",
latitude="32n43",
longitude="117w09",
)
# or, alternatively...
from datetime import datetime
native = charts.Subject(
date_time=datetime(2000, 1, 1, 10, 0, 0),
latitude=32.71667,
longitude=-117.15,
)
# and then...
natal = charts.Natal(native)
for object in natal.objects.values():
print(object)
# Sun 10°37'26" in Capricorn, 11th House
# Moon 16°19'29" in Scorpio, 8th House
# Mercury 02°16'43" in Capricorn, 10th House
# Venus 01°52'05" in Sagittarius, 9th House
# Mars 28°09'26" in Aquarius, 12th House
# Jupiter 25°15'48" in Aries, 2nd House
# Saturn 10°23'27" in Taurus, 2nd House, Retrograde
# Uranus 14°49'19" in Aquarius, 12th House
# Neptune 03°12'07" in Aquarius, 12th House
# Pluto 11°27'49" in Sagittarius, 9th House
# ...etc.
Add asteroid Ceres into the mix via the Config class:
from immanuel import charts
from immanuel.const import chart
config = charts.Config()
config.objects.append(chart.CERES)
native = charts.Subject(
date_time="2000-01-01 10:00",
latitude="32n43",
longitude="117w09"
)
natal = charts.Natal(native, config=config)
for object in natal.objects.values():
print(object)
# This now appears:
# Ceres 04°30'28" in Libra, 7th House
We can see much more data by serializing the chart's properties (or even the whole chart itself) to JSON. For example, to see the Sun's full dataset:
import json
from immanuel import charts
from immanuel.const import chart
native = charts.Subject(
date_time="2000-01-01 10:00",
latitude="32n43",
longitude="117w09"
)
natal = charts.Natal(native)
print(json.dumps(natal.objects[chart.SUN], cls=charts.ToJSON, indent=4))
Which will output this:
{
"index": 4000001,
"name": "Sun",
"type": {
"index": 4000000,
"name": "Planet"
},
"latitude": {
"raw": 0.00022547880358658867,
"formatted": "00\u00b000'01\"",
"direction": "+",
"degrees": 0,
"minutes": 0,
"seconds": 1
},
"longitude": {
"raw": 280.62378011422516,
"formatted": "280\u00b037'26\"",
"direction": "+",
"degrees": 280,
"minutes": 37,
"seconds": 26
},
"sign_longitude": {
"raw": 10.623780114225156,
"formatted": "10\u00b037'26\"",
"direction": "+",
"degrees": 10,
"minutes": 37,
"seconds": 26
},
"sign": {
"number": 10,
"name": "Capricorn",
"element": "Earth",
"modality": "Cardinal"
},
"decan": {
"number": 2,
"name": "2nd Decan"
},
"house": {
"index": 2000011,
"number": 11,
"name": "11th House"
},
"distance": 0.9833259252292994,
"speed": 1.0194579732387614,
"movement": {
"direct": true,
"stationary": false,
"retrograde": false,
"typical": true,
"formatted": "Direct"
},
"declination": {
"raw": -23.012365494740244,
"formatted": "-23\u00b000'45\"",
"direction": "-",
"degrees": 23,
"minutes": 0,
"seconds": 45
},
"out_of_bounds": false,
"in_sect": true,
"dignities": {
"ruler": false,
"exalted": false,
"triplicity_ruler": false,
"term_ruler": false,
"face_ruler": false,
"mutual_reception_ruler": false,
"mutual_reception_exalted": false,
"mutual_reception_triplicity_ruler": true,
"mutual_reception_term_ruler": false,
"mutual_reception_face_ruler": false,
"detriment": false,
"fall": false,
"peregrine": false,
"formatted": [
"Triplicity Ruler by mutual reception"
]
},
"score": 3
}
Tests
Tests are available via pytest. If you have cloned the repo, simply run pytest from the root:
python -m pytest
Translations
Immanuel's output is currently available in the following locales / languages:
- en_US: (default) US English
- pt_BR: Brazilian Portuguese
- es_ES: Spanish
- de_DE: German
See here for details on how to switch. The documentation itself is not currently available in other translations. To contribute in-software translations, see here.
AI Transparency
Immanuel is a passion project, and as such all of the code in this package - including the tests - is 100% hand-rolled by a human. AI is used to assist in planning, checking, and auditing the codebase and documentation, and Claude Code has write permission for the documentation only, in order to provide suggested updates and examples to help keep them in line with code changes.
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
Credits
- @aloistr / Alois Treindl and Dieter Koch at Astrodienst for the mighty Swiss Ephemeris
- @astrorigin / Stanislas Marquis for the OG Python port pyswisseph
- @sailorfe for its subsequent rescue and revival at pysweph
- @flatangle / João Ventura for the incredibly detailed flatlib which first inspired the development of this package
- @nodbr / Nathan Octavio who suggested translations, and who translated Immanuel into both Brazilian Portuguese and Spanish
- @cosmosandapi who provided the German translation
Contact
Please post any issues, feature requests, PRs etc. on GitHub.
Metadata
Release files for immanuel 1.7.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 |
|---|---|---|---|---|
| immanuel-1.7.0.tar.gz | 11.5 MB | Without provenance | Details for immanuel-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| immanuel-1.7.0-py3-none-any.whl | Python 3 | none | any | Details for immanuel-1.7.0-py3-none-any.whl |
Total release size: 22.9 MB
Release files / immanuel-1.7.0.tar.gz
| Download URL | immanuel-1.7.0.tar.gz |
|---|---|
| Size | 11.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e34e56448d3589c67d688381d8ac2c498663f88a2c4cbcda8a820199f55ce4d
|
|
BLAKE2b-256 checksum How to use checksums |
22057e8a3bb4eb083252afd92e627377a45845976d89d4f69cdd75f7ba74d5d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.2
|
Release files / immanuel-1.7.0-py3-none-any.whl
| Download URL | immanuel-1.7.0-py3-none-any.whl |
|---|---|
| Size | 11.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c1ebff05f7f2149c4aa88b8750c3286daebc586c7101484b72b143e1b05927d
|
|
BLAKE2b-256 checksum How to use checksums |
2f81431cb35048119fe55617f971fadb092d726c0af1d9124e995bb566e1967c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.2
|
Security for immanuel 1.7.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.