Skip to content

hoishing/natal-report

Repository files navigation

PDF Report for the Natal Package

ci-badge pypi-badge MIT-badge black-badge

generate PDF report for the Natal package

Installation

  • dependencies:
    • Natal: for natal chart data and SVG paths
    • weasyprint: PDF generation
      • refer weasyprint docs for installing OS dependencies
      • you may need to install Pango for text rendering

pip install natal-report

or install as optional dependency of Natal:

pip install "natal[report]"

Usage

from natal import Data, Config
from natal.config import Orb
from natal_report import Report

config = Config(
    theme_type="mono",
    orb=Orb(conjunction=2, opposition=2, trine=2, square=2, sextile=1),
)

mimi = Data(
    name="Mimi",
    utc_dt="1980-02-23 00:00",
    lat=25.0375,
    lon=121.5633,
    config=config,
)

transit = Data(
    name="transit",
    utc_dt="2024-12-21 00:00",
    lat=25.0375,
    lon=121.5633,
)

report = Report(data1=mimi, data2=transit)
html = report.full_report
bytes_io = report.create_pdf(html)

with open("demo_report_mono.pdf", "wb") as f:
    f.write(bytes_io.getbuffer())

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published