Divisional Charts API with Flask
Integrate Divisional Charts API in Flask. Complete code examples and SDK documentation.
Operation
POST /v2/astrology/divisional-charts
Rasi (D1) and Navamsa (D9) charts for a birth moment, each with ascendant, houses and planets.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
datetime | body | string | Birth date and time in ISO 8601, for example 1990-05-15T10:30:00+05:30. Send this, or date with time. |
date | body | string | Birth date as YYYY-MM-DD. Used when datetime is not sent. |
time | body | string | Birth time as HH:MM, used with date. Defaults to 12:00 when omitted. |
latitude | body | number | Required. Latitude of the birth place in decimal degrees, -90 to 90. Alias lat. |
longitude | body | number | Required. Longitude of the birth place in decimal degrees, -180 to 180. Aliases lon, lng, long. |
timezone | body | string | IANA zone name or UTC offset such as +05:30. Inferred from the coordinates when omitted. |
Request example for Flask
Authenticate with Authorization: Bearer YOUR_API_KEY. Keep the key in the VEDIKA_API_KEY environment variable on your server and never in source control.
import os
import requests
def call_vedika():
return requests.post(
"https://api.vedika.io/v2/astrology/divisional-charts",
headers={"Authorization": "Bearer " + os.environ["VEDIKA_API_KEY"]},
json={
"datetime": "1990-05-15T10:30:00+05:30",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": "Asia/Kolkata",
},
timeout=30,
)
from flask import Flask, jsonify
app = Flask(__name__)
@app.get("/vedika/divisional-charts")
def read():
upstream = call_vedika()
return jsonify(upstream.json()), upstream.status_code
Try it in the keyless sandbox
The sandbox mirrors the production route and needs no API key:
curl -X POST https://api.vedika.io/sandbox/astrology/divisional-charts \
-H "Content-Type: application/json" \
-d '{"datetime":"1990-05-15T10:30:00+05:30","latitude":28.6139,"longitude":77.209,"timezone":"Asia/Kolkata"}'
Sandbox response from POST /sandbox/astrology/divisional-charts, abridged (billing block, long text fields and long lists trimmed). The sandbox answers with a fixed demo result and ignores your inputs; a production call computes the result for the details you send.
{
"data": {
"D1": {
"ascendant": {
"degree": 13.55258465896992,
"sign": "Pisces"
},
"houses": [
{
"house": 1,
"lordPlacement": null,
"sign": "Pisces",
"signLord": "Jupiter"
},
{
"house": 2,
"lordPlacement": null,
"sign": "Aries",
"signLord": "Mars"
}
],
"moonSign": "Sagittarius",
"nakshatra": "Purva Ashadha",
"planets": [
{
"degree": 16.57555454286853,
"dignity": null,
"house": 10,
"isRetrograde": false,
"nakshatra": "Purva Ashadha",
"nakshatraLord": "Venus",
"nakshatraPada": 1,
"name": "Sun",
"sign": "Sagittarius",
"signNumber": 9
},
{
"degree": 14.0172602641901,
"dignity": null,
"house": 10,
"isRetrograde": false,
"nakshatra": "Purva Ashadha",
"nakshatraLord": "Venus",
"nakshatraPada": 1,
"name": "Moon",
"sign": "Sagittarius",
"signNumber": 9
}
],
"source": "vedika-ephemeris",
"sunSign": "Sagittarius",
"tithi": "Krishna Purnima/Amavasya",
"zodiacSystem": "vedic",
"zodiacType": "sidereal"
},
"D9": {
"ascendant": {
"degree": 1.973261930729274,
"sign": "Scorpio"
},
"houses": [
{
"house": 1,
"lordPlacement": null,
"sign": "Scorpio",
"signLord": "Mars"
},
{
"house": 2,
"lordPlacement": null,
"sign": "Sagittarius",
"signLord": "Jupiter"
}
],
"moonSign": "Leo",
"nakshatra": "Purva Ashadha",
"planets": [
{
"degree": 29.17999088581677,
"dignity": "Moolatrikona",
"house": 10,
"isRetrograde": false,
"nakshatra": "Purva Ashadha",
"nakshatraLord": "Venus",
"nakshatraPada": 1,
"name": "Sun",
"sign": "Leo",
"signNumber": 5
},
{
"degree": 6.155342377710889,
"dignity": "Neutral",
"house": 10,
"isRetrograde": false,
"nakshatra": "Purva Ashadha",
"nakshatraLord": "Venus",
"nakshatraPada": 1,
"name": "Moon",
"sign": "Leo",
"signNumber": 5
}
],
"source": "vedika-ephemeris:navamsa-d9",
"sunSign": "Leo",
"tithi": "Krishna Purnima/Amavasya",
"zodiacSystem": "vedic",
"zodiacType": "sidereal"
}
},
"meta": {
"contentMode": "fixture",
"engine": "vedika-intelligence",
"fixtureId": "demo-birth-1995-new-delhi",
"inputUsage": "ignored",
"mode": "sandbox",
"sample": true,
"version": "2.1.0"
},
"success": true
}
Related
The same endpoint in other stacks:
Last updated: 22 November 2026