NOTE: v1.6.0 introduces breaking changes. Please see the 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. See like this:
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 each of the chart's objects in this format:
{
"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 subsqeuent 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file immanuel-1.6.0.tar.gz.
File metadata
- Download URL: immanuel-1.6.0.tar.gz
- Upload date:
- Size: 11.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19b1c88a6f17103cb3732759de9c30c5d2b2a1cc3a7448b36dabe576c3a28c00
|
|
| MD5 |
f95872fb4d213f59749c1f533fdc73d7
|
|
| BLAKE2b-256 |
598173069468d3234cae0f9cd1968a6e7bd86211e2afa63838580d3312bb909e
|
File details
Details for the file immanuel-1.6.0-py3-none-any.whl.
File metadata
- Download URL: immanuel-1.6.0-py3-none-any.whl
- Upload date:
- Size: 11.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8b84c9714add819a71bd2a5a9112697bff3c3888a0656092c6a2bb014bac72c
|
|
| MD5 |
f944b074596f515305c171b8cf7e3462
|
|
| BLAKE2b-256 |
30b75da4174c2e65b93a56ce09a546d191e2ea56337bf3cb5662e98be34d4f37
|