<h1 align=center>Kerykeion</h1>
<div align="center">
<a href="#">
<img src="https://img.shields.io/github/contributors/g-battaglia/kerykeion?color=blue&logo=github" alt="contributors">
</a>
<a href="#">
<img src="https://img.shields.io/github/stars/g-battaglia/kerykeion.svg?logo=github" alt="stars">
</a>
<a href="#">
<img src="https://img.shields.io/github/forks/g-battaglia/kerykeion.svg?logo=github" alt="forks">
</a>
<a href="https://pypi.org/project/kerykeion" target="_blank">
<img src="https://visitor-badge.laobi.icu/badge?page_id=g-battaglia.kerykeion" alt="visitors"/>
</a>
<a href="https://pypi.org/project/kerykeion" target="_blank">
<img src="https://img.shields.io/pypi/v/kerykeion?label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/kerykeion" target="_blank">
<img src="https://img.shields.io/pypi/pyversions/kerykeion.svg" alt="Supported Python versions">
</a>
</div>
Kerykeion is a python library for Astrology.
It can calculate all the planet and house position,
also it can calculate the aspects of a single persone or between two, you can set how many planets you
need in the settings in the utility module.
It also can generate an SVG of a birthchart, a synastry chart or a transit chart.
The core goal of this project is to provide a simple and easy approach to astrology in a data driven way.
Here's an example of a birthchart:
![Kanye Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)
## Web API
If you want to use Kerykeion in a web application, I've created a web API for this purpose, you can find it here:
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/pricing)**
It's [open source](https://github.com/g-battaglia/Astrologer-API), it's a way to support me and the project.
## Donate
Maintaining this project is a lot of work, the Astrologer API doesn't nearly cover the costs of a software engineer working on this project full time. I do this because I love it, but until I can make this my full time job, I won't be able to spend as much time on it.
If you want to support me, you can do it here:
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/kerykeion)
## Installation
Kerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above installed on your system.
```bash
pip3 install kerykeion
```
## Basic Usage
The basic usage of the library is to create an instance of the AstrologicalSubject class and then access the properties of the instance to get the astrological information about the subject.
Here's an example:
```python
# Import the main class for creating a kerykeion instance:
from kerykeion import AstrologicalSubject
# Create a kerykeion instance:
# Args: Name, year, month, day, hour, minuts, city, nation
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
# Get the information about the sun in the chart:
# (The position of the planets always starts at 0)
kanye.sun
#> {'name': 'Sun', 'quality': 'Mutable', 'element': 'Air', 'sign': 'Gem', 'sign_num': 2, 'pos': 17.598992059774275, 'abs_pos': 77.59899205977428, 'emoji': '♊️', 'house': '12th House', 'retrograde': False}
# Get information about the first house:
kanye.first_house
#> {'name': 'First_House', 'quality': 'Cardinal', 'element': 'Water', 'sign': 'Can', 'sign_num': 3, 'pos': 17.995779673209114, 'abs_pos': 107.99577967320911, 'emoji': '♋️'}
# Get element of the moon sign:
kanye.moon.element
#> 'Water'
```
**To avoid connecting to GeoNames (eg. avoiding hourly limit or no internet connection) you should instance kerykeion like this:**
```python
kanye = AstrologicalSubject(
"Kanye", 1977, 6, 8, 8, 45, lng=50, lat=50, tz_str="Europe/Rome", city="Rome"
)
```
The difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation.
If you omit the nation, it will be set to "GB" by default, but the value is not used for calculations. It's better to set it to the correct value though.
## Generate a SVG Chart
### Birth Chart
```python
from kerykeion import AstrologicalSubject, KerykeionChartSVG
birth_chart = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
birth_chart_svg = KerykeionChartSVG(birth_chart)
birth_chart_svg.makeSVG()
```
The SVG file will be saved in the home directory.
![John Lennon Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)
### Synastry Chart
```python
from kerykeion import AstrologicalSubject, KerykeionChartSVG
first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
# Set the type, it can be Natal, Synastry or Transit
synastry_chart = KerykeionChartSVG(first, "Synastry", second)
synastry_chart.makeSVG()
```
![John Lennon and Paul McCartney Synastry](https://www.kerykeion.net/docs/assets/img/examples/synastry-chart.svg)
### Change the output directory
By default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:
```python
from kerykeion import AstrologicalSubject, KerykeionChartSVG
first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
# Set the output directory to the current directory
synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
synastry_chart.makeSVG()
```
### Change Language
You can change the language of the SVG by passing the `chart_language` parameter to the KerykeionChartSVG class:
```python
first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB", chart_language="ES")
```
More details [here](https://www.kerykeion.net/docs/examples/chart-language).
## Report
To print a report of all the data:
```python
from kerykeion import Report, AstrologicalSubject
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
report = Report(kanye)
report.print_report()
```
Returns:
```txt
+- Kerykeion report for Kanye -+
+----------+------+-------------+-----------+----------+
| Date | Time | Location | Longitude | Latitude |
+----------+------+-------------+-----------+----------+
| 8/6/1977 | 8:45 | Atlanta, US | -84.38798 | 33.749 |
+----------+------+-------------+-----------+----------+
+-----------------+------+-------+------+----------------+
| Planet | Sign | Pos. | Ret. | House |
+-----------------+------+-------+------+----------------+
| Sun | Gem | 17.6 | - | Twelfth_House |
| Moon | Pis | 16.43 | - | Ninth_House |
| Mercury | Tau | 26.29 | - | Eleventh_House |
| Venus | Tau | 2.03 | - | Tenth_House |
| Mars | Tau | 1.79 | - | Tenth_House |
| Jupiter | Gem | 14.61 | - | Eleventh_House |
| Saturn | Leo | 12.8 | - | Second_House |
| Uranus | Sco | 8.27 | R | Fourth_House |
| Neptune | Sag | 14.69 | R | Fifth_House |
| Pluto | Lib | 11.45 | R | Fourth_House |
| Mean_Node | Lib | 21.49 | R | Fourth_House |
| True_Node | Lib | 22.82 | R | Fourth_House |
| Mean_South_Node | Ari | 21.49 | R | Tenth_House |
| True_South_Node | Ari | 22.82 | R | Tenth_House |
| Chiron | Tau | 4.17 | - | Tenth_House |
+-----------------+------+-------+------+----------------+
+----------------+------+----------+
| House | Sign | Position |
+----------------+------+----------+
| First_House | Can | 18.0 |
| Second_House | Leo | 9.51 |
| Third_House | Vir | 4.02 |
| Fourth_House | Lib | 3.98 |
| Fifth_House | Sco | 9.39 |
| Sixth_House | Sag | 15.68 |
| Seventh_House | Cap | 18.0 |
| Eighth_House | Aqu | 9.51 |
| Ninth_House | Pis | 4.02 |
| Tenth_House | Ari | 3.98 |
| Eleventh_House | Tau | 9.39 |
| Twelfth_House | Gem | 15.68 |
+----------------+------+----------+
```
And if you want to export it to a file:
```bash
python3 your_script_name.py > file.txt
```
## Other examples of possible use cases:
```python
# Get all aspects between two persons:
from kerykeion import SynastryAspects, AstrologicalSubject
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")
name = SynastryAspects(first, second)
aspect_list = name.get_relevant_aspects()
print(aspect_list[0])
#> Generating kerykeion object for Jack...
#> Generating kerykeion object for Jane...
#> {'p1_name': 'Sun', 'p1_abs_pos': 84.17867971515636, 'p2_name': 'Sun', 'p2_abs_pos': 211.90472999502984, 'aspect': 'trine', 'orbit': 7.726050279873476, 'aspect_degrees': 120, 'color': '#36d100', 'aid': 6, 'diff': 127.72605027987348, 'p1': 0, 'p2': 0}
```
## Ayanamsa (Sidereal Modes)
By default, the zodiac type is set to Tropic (Tropical).
You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:
```python
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
```
More examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).
Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).
## Houses Systems
By default, the houses system is set to Placidus.
You can set the houses system in the AstrologicalSubject class:
```python
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
```
More examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).
Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
## Perspective Type
By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).
The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).
You can set the perspective type in the AstrologicalSubject class:
```python
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Heliocentric")
```
More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
## Themes
You can now personalize your astrological charts with different themes! Four themes are available:
- **Classic** (default)
- **Dark**
- **Dark High Contrast**
- **Light**
Each theme offers a distinct visual style, allowing you to choose the one that best suits your preferences or presentation needs. If you prefer more control over the appearance, you can opt not to set any theme, making it easier to customize the chart by overriding the default CSS variables. For more detailed instructions on how to apply themes, check the [documentation](https://www.kerykeion.net/docs/examples/theming)
Here's an example of how to set the theme:
```python
from kerykeion import AstrologicalSubject, KerykeionChartSVG
dark_theme_subject = AstrologicalSubject("John Lennon - Dark Theme", 1940, 10, 9, 18, 30, "Liverpool", "GB")
dark_theme_natal_chart = KerykeionChartSVG(dark_high_contrast_theme_subject, theme="dark_high_contrast")
dark_theme_natal_chart.makeSVG()
```
![John Lennon](https://www.kerykeion.net/assets/img/showcase/John%20Lennon%20-%20Dark%20-%20Natal%20Chart.svg)
## Alternative Initialization
You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
```python
subject = AstrologicalSubject.get_from_iso_utc_time(
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")
```
Note : The default time zone is UTC, with Greenwich longitude and latitude.
The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:
```python
from kerykeion.astrological_subject import AstrologicalSubject
# Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
subject = AstrologicalSubject.get_from_iso_utc_time(
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
```
## Lunar Nodes (Rahu & Ketu)
The following are present:
- True North Lunar Node: Simply referred to as "true_node" (without the term "north") for backward compatibility.
- True South Lunar Node: Referred to as "true_south_node."
- Mean North Lunar Node: Referred to as "mean_node" (without the term "north") for backward compatibility.
- Mean South Lunar Node: Referred to as "mean_south_node."
In instances of the AstrologicalSubject class, all of them are active by default.
In instances of the classes used to generate aspects and SVG charts, only the mean nodes are active. To activate the true nodes, you need to edit the configuration file (kr.config.json).
Example:
```json
...
{
"id": 19,
"name": "True_South_Node",
"color": "var(--kerykeion-chart-color-true-node)",
"is_active": true, // Set to true to activate the true node
"element_points": 0,
"related_zodiac_signs": [],
"label": "True_South_Node"
}
...
```
In the charts, by default, the mean nodes (M) are displayed, while the true nodes are not displayed.
To display them, you need to edit the configuration file (kr.config.json).
## JSON Support
The astrological subject, which is the base of data used in the library, can be easily serialized to JSON with the `json` method.
```python
from kerykeion import AstrologicalSubject
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
print(johnny.json(dump=False, indent=2))
```
## Documentation
Most of the functions and the classes are self documented by the types and have docstrings.
An auto-generated documentation [is available here](https://www.kerykeion.net/pydocs/kerykeion.html).
Sooner or later I'll try to write an extensive documentation.
## Development
You can clone this repository or download a zip file using the right side buttons.
## Integrate Kerykeion Functionalities in Your Project
If you are interested in integrating Kerykeion's astrological functionalities into your project, I would be happy to collaborate with you. Whether you need custom features, support, or consultation, feel free to reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Integration%20Request) address.
## License
This project is licensed under the AGPL-3.0 License.
To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
If you have questions, you can reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Kerykeion) address.
As a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.
You can implement the logic of kerykeion in your project and also keep it closed source by using a third party API, like the [AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/). The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.
## Contributing
Feel free to contribute to the code!
Raw data
{
"_id": null,
"home_page": "https://www.kerykeion.net/",
"name": "kerykeion",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "astrology, ephemeris, astrology library, birtchart, svg, zodiac, zodiac-sing, astronomical-algorithms, synastry, astrology-calculator",
"author": "Giacomo Battaglia",
"author_email": "kerykeion.astrology@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/36/26/5b259530317d1ead5028a88a7885cd6ab415252888f883f8a02410e9e2b9/kerykeion-4.20.0.tar.gz",
"platform": null,
"description": "<h1 align=center>Kerykeion</h1>\n<div align=\"center\">\n <a href=\"#\">\n <img src=\"https://img.shields.io/github/contributors/g-battaglia/kerykeion?color=blue&logo=github\" alt=\"contributors\">\n </a>\n <a href=\"#\">\n <img src=\"https://img.shields.io/github/stars/g-battaglia/kerykeion.svg?logo=github\" alt=\"stars\">\n </a>\n <a href=\"#\">\n <img src=\"https://img.shields.io/github/forks/g-battaglia/kerykeion.svg?logo=github\" alt=\"forks\">\n </a>\n <a href=\"https://pypi.org/project/kerykeion\" target=\"_blank\">\n <img src=\"https://visitor-badge.laobi.icu/badge?page_id=g-battaglia.kerykeion\" alt=\"visitors\"/>\n </a>\n <a href=\"https://pypi.org/project/kerykeion\" target=\"_blank\">\n <img src=\"https://img.shields.io/pypi/v/kerykeion?label=pypi%20package\" alt=\"Package version\">\n </a>\n <a href=\"https://pypi.org/project/kerykeion\" target=\"_blank\">\n <img src=\"https://img.shields.io/pypi/pyversions/kerykeion.svg\" alt=\"Supported Python versions\">\n </a>\n</div>\n\n \n\nKerykeion is a python library for Astrology.\nIt can calculate all the planet and house position,\nalso it can calculate the aspects of a single persone or between two, you can set how many planets you\nneed in the settings in the utility module.\nIt also can generate an SVG of a birthchart, a synastry chart or a transit chart.\n\nThe core goal of this project is to provide a simple and easy approach to astrology in a data driven way.\n\nHere's an example of a birthchart:\n\n![Kanye Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)\n\n## Web API\n\nIf you want to use Kerykeion in a web application, I've created a web API for this purpose, you can find it here:\n\n**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/pricing)**\n\nIt's [open source](https://github.com/g-battaglia/Astrologer-API), it's a way to support me and the project.\n\n## Donate\n\nMaintaining this project is a lot of work, the Astrologer API doesn't nearly cover the costs of a software engineer working on this project full time. I do this because I love it, but until I can make this my full time job, I won't be able to spend as much time on it.\n\nIf you want to support me, you can do it here:\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/kerykeion)\n\n## Installation\n\nKerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above installed on your system.\n\n```bash\npip3 install kerykeion\n```\n\n## Basic Usage\n\nThe basic usage of the library is to create an instance of the AstrologicalSubject class and then access the properties of the instance to get the astrological information about the subject.\n\nHere's an example:\n\n```python\n\n# Import the main class for creating a kerykeion instance:\nfrom kerykeion import AstrologicalSubject\n\n# Create a kerykeion instance:\n# Args: Name, year, month, day, hour, minuts, city, nation\nkanye = AstrologicalSubject(\"Kanye\", 1977, 6, 8, 8, 45, \"Atlanta\", \"US\")\n\n# Get the information about the sun in the chart:\n# (The position of the planets always starts at 0)\nkanye.sun\n\n#> {'name': 'Sun', 'quality': 'Mutable', 'element': 'Air', 'sign': 'Gem', 'sign_num': 2, 'pos': 17.598992059774275, 'abs_pos': 77.59899205977428, 'emoji': '\u264a\ufe0f', 'house': '12th House', 'retrograde': False}\n\n# Get information about the first house:\nkanye.first_house\n\n#> {'name': 'First_House', 'quality': 'Cardinal', 'element': 'Water', 'sign': 'Can', 'sign_num': 3, 'pos': 17.995779673209114, 'abs_pos': 107.99577967320911, 'emoji': '\u264b\ufe0f'}\n\n# Get element of the moon sign:\nkanye.moon.element\n\n#> 'Water'\n\n```\n\n**To avoid connecting to GeoNames (eg. avoiding hourly limit or no internet connection) you should instance kerykeion like this:**\n\n```python\nkanye = AstrologicalSubject(\n \"Kanye\", 1977, 6, 8, 8, 45, lng=50, lat=50, tz_str=\"Europe/Rome\", city=\"Rome\"\n)\n```\n\nThe difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation.\nIf you omit the nation, it will be set to \"GB\" by default, but the value is not used for calculations. It's better to set it to the correct value though.\n\n## Generate a SVG Chart\n\n### Birth Chart\n\n```python\nfrom kerykeion import AstrologicalSubject, KerykeionChartSVG\n\n\nbirth_chart = AstrologicalSubject(\"Kanye\", 1977, 6, 8, 8, 45, \"Atlanta\", \"US\")\nbirth_chart_svg = KerykeionChartSVG(birth_chart)\n\nbirth_chart_svg.makeSVG()\n```\n\nThe SVG file will be saved in the home directory.\n![John Lennon Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)\n\n### Synastry Chart\n\n```python\nfrom kerykeion import AstrologicalSubject, KerykeionChartSVG\n\nfirst = AstrologicalSubject(\"John Lennon\", 1940, 10, 9, 18, 30, \"Liverpool\", \"GB\")\nsecond = AstrologicalSubject(\"Paul McCartney\", 1942, 6, 18, 15, 30, \"Liverpool\", \"GB\")\n\n# Set the type, it can be Natal, Synastry or Transit\nsynastry_chart = KerykeionChartSVG(first, \"Synastry\", second)\nsynastry_chart.makeSVG()\n\n```\n\n![John Lennon and Paul McCartney Synastry](https://www.kerykeion.net/docs/assets/img/examples/synastry-chart.svg)\n\n### Change the output directory\n\nBy default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:\n\n```python\nfrom kerykeion import AstrologicalSubject, KerykeionChartSVG\n\nfirst = AstrologicalSubject(\"John Lennon\", 1940, 10, 9, 18, 30, \"Liverpool\", \"GB\")\nsecond = AstrologicalSubject(\"Paul McCartney\", 1942, 6, 18, 15, 30, \"Liverpool\", \"GB\")\n\n# Set the output directory to the current directory\nsynastry_chart = KerykeionChartSVG(first, \"Synastry\", second, new_output_directory=\".\")\nsynastry_chart.makeSVG()\n```\n\n### Change Language\n\nYou can change the language of the SVG by passing the `chart_language` parameter to the KerykeionChartSVG class:\n\n```python\nfirst = AstrologicalSubject(\"John Lennon\", 1940, 10, 9, 18, 30, \"Liverpool\", \"GB\", chart_language=\"ES\")\n```\nMore details [here](https://www.kerykeion.net/docs/examples/chart-language).\n\n## Report\n\nTo print a report of all the data:\n\n```python\nfrom kerykeion import Report, AstrologicalSubject\n\nkanye = AstrologicalSubject(\"Kanye\", 1977, 6, 8, 8, 45, \"Atlanta\", \"US\")\nreport = Report(kanye)\nreport.print_report()\n\n```\n\nReturns:\n\n```txt\n+- Kerykeion report for Kanye -+\n+----------+------+-------------+-----------+----------+\n| Date | Time | Location | Longitude | Latitude |\n+----------+------+-------------+-----------+----------+\n| 8/6/1977 | 8:45 | Atlanta, US | -84.38798 | 33.749 |\n+----------+------+-------------+-----------+----------+\n+-----------------+------+-------+------+----------------+\n| Planet | Sign | Pos. | Ret. | House |\n+-----------------+------+-------+------+----------------+\n| Sun | Gem | 17.6 | - | Twelfth_House |\n| Moon | Pis | 16.43 | - | Ninth_House |\n| Mercury | Tau | 26.29 | - | Eleventh_House |\n| Venus | Tau | 2.03 | - | Tenth_House |\n| Mars | Tau | 1.79 | - | Tenth_House |\n| Jupiter | Gem | 14.61 | - | Eleventh_House |\n| Saturn | Leo | 12.8 | - | Second_House |\n| Uranus | Sco | 8.27 | R | Fourth_House |\n| Neptune | Sag | 14.69 | R | Fifth_House |\n| Pluto | Lib | 11.45 | R | Fourth_House |\n| Mean_Node | Lib | 21.49 | R | Fourth_House |\n| True_Node | Lib | 22.82 | R | Fourth_House |\n| Mean_South_Node | Ari | 21.49 | R | Tenth_House |\n| True_South_Node | Ari | 22.82 | R | Tenth_House |\n| Chiron | Tau | 4.17 | - | Tenth_House |\n+-----------------+------+-------+------+----------------+\n+----------------+------+----------+\n| House | Sign | Position |\n+----------------+------+----------+\n| First_House | Can | 18.0 |\n| Second_House | Leo | 9.51 |\n| Third_House | Vir | 4.02 |\n| Fourth_House | Lib | 3.98 |\n| Fifth_House | Sco | 9.39 |\n| Sixth_House | Sag | 15.68 |\n| Seventh_House | Cap | 18.0 |\n| Eighth_House | Aqu | 9.51 |\n| Ninth_House | Pis | 4.02 |\n| Tenth_House | Ari | 3.98 |\n| Eleventh_House | Tau | 9.39 |\n| Twelfth_House | Gem | 15.68 |\n+----------------+------+----------+\n\n```\n\nAnd if you want to export it to a file:\n\n```bash\npython3 your_script_name.py > file.txt\n```\n\n## Other examples of possible use cases:\n\n```python\n# Get all aspects between two persons:\n\nfrom kerykeion import SynastryAspects, AstrologicalSubject\nfirst = AstrologicalSubject(\"Jack\", 1990, 6, 15, 15, 15, \"Roma\", \"IT\")\nsecond = AstrologicalSubject(\"Jane\", 1991, 10, 25, 21, 00, \"Roma\", \"IT\")\n\nname = SynastryAspects(first, second)\naspect_list = name.get_relevant_aspects()\nprint(aspect_list[0])\n\n#> Generating kerykeion object for Jack...\n#> Generating kerykeion object for Jane...\n#> {'p1_name': 'Sun', 'p1_abs_pos': 84.17867971515636, 'p2_name': 'Sun', 'p2_abs_pos': 211.90472999502984, 'aspect': 'trine', 'orbit': 7.726050279873476, 'aspect_degrees': 120, 'color': '#36d100', 'aid': 6, 'diff': 127.72605027987348, 'p1': 0, 'p2': 0}\n\n```\n\n## Ayanamsa (Sidereal Modes)\n\nBy default, the zodiac type is set to Tropic (Tropical).\nYou can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:\n\n```python\njohnny = AstrologicalSubject(\"Johnny Depp\", 1963, 6, 9, 0, 0, \"Owensboro\", \"US\", zodiac_type=\"Sidereal\", sidereal_mode=\"LAHIRI\")\n```\n\nMore examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).\n\nFull list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).\n\n## Houses Systems\n\nBy default, the houses system is set to Placidus.\nYou can set the houses system in the AstrologicalSubject class:\n\n```python\njohnny = AstrologicalSubject(\"Johnny Depp\", 1963, 6, 9, 0, 0, \"Owensboro\", \"US\", houses_system=\"M\")\n```\n\nMore examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).\n\nFull list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).\n\nSo far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.\n\n## Perspective Type\n\nBy default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).\nThe perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).\nYou can set the perspective type in the AstrologicalSubject class:\n\n```python\njohnny = AstrologicalSubject(\"Johnny Depp\", 1963, 6, 9, 0, 0, \"Owensboro\", \"US\", perspective_type=\"Heliocentric\")\n```\n\nMore examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).\n\nFull list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).\n\n## Themes\n\nYou can now personalize your astrological charts with different themes! Four themes are available:\n\n- **Classic** (default)\n- **Dark**\n- **Dark High Contrast**\n- **Light**\n\nEach theme offers a distinct visual style, allowing you to choose the one that best suits your preferences or presentation needs. If you prefer more control over the appearance, you can opt not to set any theme, making it easier to customize the chart by overriding the default CSS variables. For more detailed instructions on how to apply themes, check the [documentation](https://www.kerykeion.net/docs/examples/theming)\n\nHere's an example of how to set the theme:\n\n```python\nfrom kerykeion import AstrologicalSubject, KerykeionChartSVG\n\ndark_theme_subject = AstrologicalSubject(\"John Lennon - Dark Theme\", 1940, 10, 9, 18, 30, \"Liverpool\", \"GB\")\ndark_theme_natal_chart = KerykeionChartSVG(dark_high_contrast_theme_subject, theme=\"dark_high_contrast\")\ndark_theme_natal_chart.makeSVG()\n```\n\n![John Lennon](https://www.kerykeion.net/assets/img/showcase/John%20Lennon%20-%20Dark%20-%20Natal%20Chart.svg)\n\n## Alternative Initialization\n\nYou can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:\n\n```python\nsubject = AstrologicalSubject.get_from_iso_utc_time(\n \"Johnny Depp\", \"1963-06-09T05:00:00Z\", \"Owensboro\", \"US\")\n```\n\nNote : The default time zone is UTC, with Greenwich longitude and latitude.\n\nThe default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and\ncalculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:\n\n```python\nfrom kerykeion.astrological_subject import AstrologicalSubject\n\n# Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject\nsubject = AstrologicalSubject.get_from_iso_utc_time(\n \"Johnny Depp\", \"1963-06-09T05:00:00Z\", \"Owensboro\", \"US\", online=True)\n```\n\n## Lunar Nodes (Rahu & Ketu)\n\nThe following are present:\n\n- True North Lunar Node: Simply referred to as \"true_node\" (without the term \"north\") for backward compatibility.\n- True South Lunar Node: Referred to as \"true_south_node.\"\n- Mean North Lunar Node: Referred to as \"mean_node\" (without the term \"north\") for backward compatibility.\n- Mean South Lunar Node: Referred to as \"mean_south_node.\"\n\nIn instances of the AstrologicalSubject class, all of them are active by default.\n\nIn instances of the classes used to generate aspects and SVG charts, only the mean nodes are active. To activate the true nodes, you need to edit the configuration file (kr.config.json).\nExample:\n\n```json\n...\n {\n \"id\": 19,\n \"name\": \"True_South_Node\",\n \"color\": \"var(--kerykeion-chart-color-true-node)\",\n \"is_active\": true, // Set to true to activate the true node\n \"element_points\": 0,\n \"related_zodiac_signs\": [],\n \"label\": \"True_South_Node\"\n }\n...\n```\n\nIn the charts, by default, the mean nodes (M) are displayed, while the true nodes are not displayed. \nTo display them, you need to edit the configuration file (kr.config.json).\n\n## JSON Support\n\nThe astrological subject, which is the base of data used in the library, can be easily serialized to JSON with the `json` method.\n\n```python\nfrom kerykeion import AstrologicalSubject\n\njohnny = AstrologicalSubject(\"Johnny Depp\", 1963, 6, 9, 0, 0, \"Owensboro\", \"US\")\n\nprint(johnny.json(dump=False, indent=2))\n```\n\n## Documentation\n\nMost of the functions and the classes are self documented by the types and have docstrings.\nAn auto-generated documentation [is available here](https://www.kerykeion.net/pydocs/kerykeion.html).\n\nSooner or later I'll try to write an extensive documentation.\n\n## Development\n\nYou can clone this repository or download a zip file using the right side buttons.\n\n## Integrate Kerykeion Functionalities in Your Project\n\nIf you are interested in integrating Kerykeion's astrological functionalities into your project, I would be happy to collaborate with you. Whether you need custom features, support, or consultation, feel free to reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Integration%20Request) address.\n\n## License\n\nThis project is licensed under the AGPL-3.0 License.\nTo understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.\nIf you have questions, you can reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Kerykeion) address.\nAs a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.\n\nYou can implement the logic of kerykeion in your project and also keep it closed source by using a third party API, like the [AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/). The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.\n\n## Contributing\n\nFeel free to contribute to the code!\n",
"bugtrack_url": null,
"license": "AGPL-3.0",
"summary": "A python library for astrology.",
"version": "4.20.0",
"project_urls": {
"Homepage": "https://www.kerykeion.net/",
"Repository": "https://github.com/g-battaglia/kerykeion"
},
"split_keywords": [
"astrology",
" ephemeris",
" astrology library",
" birtchart",
" svg",
" zodiac",
" zodiac-sing",
" astronomical-algorithms",
" synastry",
" astrology-calculator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ec27853cb648cf0b25ad85b682fa915134bef1cd6cbab5901b31b010bd732657",
"md5": "d76b4539a84facb1a0b2d0df2dced287",
"sha256": "193c3c84f16173322d15cdbb369094d344e782009496ead2938d0440334c3601"
},
"downloads": -1,
"filename": "kerykeion-4.20.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d76b4539a84facb1a0b2d0df2dced287",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 379415,
"upload_time": "2024-12-21T00:11:26",
"upload_time_iso_8601": "2024-12-21T00:11:26.088347Z",
"url": "https://files.pythonhosted.org/packages/ec/27/853cb648cf0b25ad85b682fa915134bef1cd6cbab5901b31b010bd732657/kerykeion-4.20.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "36265b259530317d1ead5028a88a7885cd6ab415252888f883f8a02410e9e2b9",
"md5": "a47e5aadd86b899a638c2ce73c87b7a4",
"sha256": "0533a747be01a1d0822d53486db3892d676f528bc7a9e1f1fe41e5ebab303a6f"
},
"downloads": -1,
"filename": "kerykeion-4.20.0.tar.gz",
"has_sig": false,
"md5_digest": "a47e5aadd86b899a638c2ce73c87b7a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 361669,
"upload_time": "2024-12-21T00:11:28",
"upload_time_iso_8601": "2024-12-21T00:11:28.013341Z",
"url": "https://files.pythonhosted.org/packages/36/26/5b259530317d1ead5028a88a7885cd6ab415252888f883f8a02410e9e2b9/kerykeion-4.20.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-21 00:11:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "g-battaglia",
"github_project": "kerykeion",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "kerykeion"
}