astromool (Python)
Official client for the AstroMool API: Vedic charts computed from the Swiss Ephemeris, the 90 astromool.com calculators, and the full PDF reports. Python 3.8+, standard library only.
import os
from astromool import AstroMool, AstroMoolError
am = AstroMool(os.environ["ASTROMOOL_KEY"]) # am_test_... while you build, am_live_... in production
birth = {"date": "1995-08-14", "time": "10:35", "tz_id": "Asia/Kolkata", "lat": 25.5941, "lon": 85.1376}
chart = am.planets(birth) # {"data": ..., "meta": ...}
print(chart["data"]["ascendant"]["sign"], chart["meta"]["ayanamsa"])
m = am.calculators.run("manglik-dosha-calculator-by-date-of-birth", birth)
print(m["data"]["summary"]) # "Manglik - intensity 18/100"
Every method returns the API's envelope. meta states the ayanamsa, the UTC offset used and the engine version;
read meta["warnings"] - it flags things like a birth time that did not exist because of a DST change.
Methods
| Method | API |
|---|---|
planets(birth, ayanamsa=, node=) |
POST /v1/vedic/planets |
calculators.list() / calculators.run(slug, person, partner=, params=, detail=) |
/v1/calculators |
reports.create(slug, person, partner=, params=, lang=, webhook_url=, idempotency_key=) |
POST /v1/reports/{slug} |
reports.get(id) / reports.wait_until_ready(id, timeout=300) / reports.download(url) |
|
geo.search(q, limit) / geo.timezone(tz_id, date, time) |
/v1/geo/* |
meta.ayanamsas(date), usage(), health() |
Charts, dasha, panchang, matching and more (1.1.0)
b = {"date": "1995-08-14", "time": "10:35", "place": "Patna"} # or lat/lon/tz_id; "birth_time_unknown": True for a noon chart
am.vedic.chart(b); am.vedic.divisional(b, "D9"); am.vedic.ashtakavarga(b)
svg = am.vedic.chart_image(b, style="south", chart="D9") # format="png" -> bytes
am.dasha.vimshottari(b); am.dasha.yogini(b)
am.panchang.day({"place": "Delhi"}, "2026-10-11") # .rahu_kaal / .choghadiya / .hora
am.match.ashtakoot(groom, bride); am.numerology.core("Asha Verma", "1995-08-14")
am.dosha.check("mangal", b); am.dosha.summary(b); am.remedies.get("gemstone", b)
am.transit.natal(b); am.kp.chart(b); am.western.natal(b)
am.batch([{"path": "/v1/vedic/houses", "body": b}, {"method": "GET", "path": "/v1/usage"}])
am.topic("/v1/muhurat/vivah", {"person": {"place": "Delhi"}, "params": {"year": 2027}}) # any topic endpoint
Reports
r = am.reports.create("kundli-matching-by-date-of-birth", groom, partner=bride, lang="both")
ready = am.reports.wait_until_ready(r["data"]["report_id"])
open("report.pdf", "wb").write(am.reports.download(ready["data"]["download_url"]))
reports.create sends an Idempotency-Key (generated if you do not pass one), so a retry never creates a second report.
Errors and retries
Failures raise AstroMoolError with status, code (stable - see the errors page),
detail, request_id and field. The client retries rate_limited (waiting Retry-After), 5xx answers and
network errors (max_retries=2). quota_exceeded is never retried.
Webhooks
from astromool import verify_webhook
@app.post("/astromool-hook") # Flask
def hook():
event = verify_webhook(request.get_data(), request.headers.get("X-AstroMool-Signature"), os.environ["ASTROMOOL_WEBHOOK_SECRET"])
return "", 200
Use the raw request bytes. The webhook secret is in the dashboard under Keys.
MIT licence.
Metadata
Release files for astromool 1.1.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 |
|---|---|---|---|---|
| astromool-1.1.0.tar.gz | 7.5 kB | Without provenance | Details for astromool-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| astromool-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for astromool-1.1.0-py3-none-any.whl |
Total release size: 15.8 kB
Release files / astromool-1.1.0.tar.gz
| Download URL | astromool-1.1.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d85fce63d2c45b4ebbb05cc6b0c1f5f35385d871cec32bb73a4ca8482c66fe47
|
|
BLAKE2b-256 checksum How to use checksums |
14fbfd20e9e2613b4164c563a68c85b017c28cf8b6ebe6f00f1c7ed053a23bde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / astromool-1.1.0-py3-none-any.whl
| Download URL | astromool-1.1.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cbabb5955b96e79c6d7ae036408b1d4542799c1bae348ee8816e77e4fc4ecb6
|
|
BLAKE2b-256 checksum How to use checksums |
955d01aa18cd8168634808838475e8e6fe41a260f464ba22c78b4365cf5168ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for astromool 1.1.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.