Try Astrologer API

Subscribe to support and grow the project.

Birth Chart #

The birth chart is the most common chart in astrology. It is a representation of the sky at the moment of birth of a person. The birth chart is a map of the sky at the time of birth, showing the positions of the planets in the zodiac signs and houses. The birth chart is also known as the natal chart.

Standard Birth Chart #

from pathlib import Path
from kerykeion import AstrologicalSubjectFactory, ChartDataFactory, ChartDrawer

# Create a subject from birth data (offline example with manual coordinates)
subject = AstrologicalSubjectFactory.from_birth_data(
    "Kanye", 1977, 6, 8, 8, 45,
    lng=-84.38798,
    lat=33.7490,
    tz_str="America/New_York",
    online=False,
)

# Pre-compute natal chart data (calculations only)
chart_data = ChartDataFactory.create_natal_chart_data(subject)

# Render and save the SVG
drawer = ChartDrawer(chart_data=chart_data)
out_dir = Path("charts_output")
out_dir.mkdir(exist_ok=True)
drawer.save_svg(output_path=out_dir, filename="kanye-natal", style="classic")

The output will be a SVG file in charts_output/kanye-natal.svg.

Birth Chart

External Birth Chart #

from pathlib import Path
from kerykeion import AstrologicalSubjectFactory, ChartDataFactory, ChartDrawer

subject = AstrologicalSubjectFactory.from_birth_data(
    "John Lennon", 1940, 10, 9, 18, 30,
    lng=-2.9833,
    lat=53.4,
    tz_str="Europe/London",
    online=False,
)

chart_data = ChartDataFactory.create_natal_chart_data(subject)

# External view with planets on the external ring
drawer = ChartDrawer(chart_data=chart_data, external_view=True)
out_dir = Path("charts_output")
out_dir.mkdir(exist_ok=True)
drawer.save_svg(output_path=out_dir, filename="john-lennon-external-natal", style="classic")

The output will be a SVG file in charts_output/john-lennon-external-natal.svg.

External Birth Chart