Skip to main content

Vedaksha for Python — Vedic astrology & ephemeris

The clean-room Vedaksha Vedic-astronomy and Jyotish engine, runnable from Python with no Rust toolchain and no per-platform build. Compute kundali / janam kundali (natal charts), panchanga, vimshottari and other dashas, nakshatras, vargas (divisional charts), shadbala, ashtakavarga, muhurta, and transits / gochara — from a sub-arcsecond ephemeris (JPL DE440s/DE441, worst case 0.272″ against Horizons) or from the data-file-free VSOP87A and ELP/MPP02 series (mean 0.160″, worst case 1.473″ over 1900–2025).

This package is not a reimplementation. It ships the real Rust engine compiled to WebAssembly and runs it via wasmtime. Every value it returns is the Rust engine's own, checked bit-for-bit against the native build on a committed conformance fixture that CI regenerates on every push, including the JPL ephemeris tier. Because the engine is a single architecture-independent .wasm blob, one py3-none-any wheel works on every OS and CPU wasmtime supports (Linux glibc/musl, macOS, Windows, Android — x86-64 and arm64), on any Python ≥ 3.9.

Install

pip install vedaksha

Library

from vedaksha import Vedaksha

vk = Vedaksha()

# Every engine tool is available; the catalog is the engine's own.
for tool in vk.list_tools():
    print(tool["name"])

# Typed wrapper for a natal chart (analytical ephemeris tier). Pass a sidereal
# ayanamsha for a kundali; without one the chart is tropical.
# Every Julian Day on the tool surface is UT1 (Universal Time) — not TT, not
# TDB. The engine converts to TT internally for the dynamical terms and uses
# UT1 directly for the Earth's rotation, which sets the ascendant and all
# twelve house cusps; passing TDB rotates every cusp by ~0.29 degrees.
chart = vk.natal_chart(julian_day=2451545.0, latitude=28.6139, longitude=77.2090,
                       ayanamsha="IndianOfficial", house_system="WholeSign")

# Every tool is callable by name — inspect its inputs with list_tools():
vargas = vk.call_tool("compute_vargas", julian_day=2451545.0,
                      latitude=28.6, longitude=77.2, divisions=["D9"])
# compute_panchanga needs an observer: the vara (weekday) is reckoned from
# LOCAL SUNRISE, so latitude and longitude are required, and elevation_m /
# tz_offset_minutes refine which sunrise and what it is called.
panchanga = vk.call_tool("compute_panchanga", jd=2451545.0, sun=280.0, moon=120.4,
                         latitude=28.6139, longitude=77.2090,
                         elevation_m=216.0, tz_offset_minutes=330)
dasha = vk.call_tool("compute_dasha", birth_jd=2451545.0, moon_longitude=120.4)
# compute_shadbala takes a moment and a place and returns every part of each
# graha's strength; the ayanamsha is required, and the Sun must rise and set.
shadbala = vk.call_tool("compute_shadbala", julian_day=2461338.0,
                        latitude=13.08, longitude=80.27,
                        ayanamsha="IndianOfficial", tz_offset_minutes=330)

Sub-arcsecond positions (SPK tier)

The tool surface uses the built-in analytical ephemeris, which needs no data files. Against JPL Horizons over 1900 to 2025 it measures 0.160″ mean and 1.473″ worst case across nine bodies (the Moon 0.094″ mean, 0.276″ worst case). For the 0.096″ mean and 0.272″ worst case the JPL DE440s kernel measures against the same reference, supply that kernel:

with open("de440s.bsp", "rb") as f:
    vk.load_ephemeris(f.read())

# NOTE: this one Julian Day is TDB, not UT1. It is a raw SPK segment query —
# the kernel's coefficients are tabulated against TDB and no Delta T
# conversion is applied on this path.
vk.state_vector("moon", julian_day=2451545.0)
# {'x': ..., 'y': ..., 'z': ..., 'vx': ..., 'vy': ..., 'vz': ...}  # AU, ICRS

Command line

vedaksha tools
vedaksha chart --julian-day 2451545.0 --latitude 28.6 --longitude 77.2 --ayanamsha IndianOfficial
vedaksha call compute_vargas --args '{"julian_day":2451545.0,"latitude":28.6,"longitude":77.2,"ayanamsha":"IndianOfficial","divisions":["D9"]}'

MCP server

Self-host the engine as a Model Context Protocol server — the original motivation for this package, since it needs no Rust toolchain anywhere. Three equivalent ways to start it over stdio:

uvx vedaksha mcp      # no install
vedaksha-mcp          # after `pip install vedaksha`
python -m vedaksha.mcp

HTTP is available from the python -m form only, with bearer-token auth on by default:

VEDAKSHA_MCP_TOKEN=secret python -m vedaksha.mcp --http --port 3100

As with the Rust engine's HTTP server, auth is on by default; this one also binds to 127.0.0.1. Pass --insecure-no-auth and --host 0.0.0.0 only behind a trusted boundary.

REST (optional)

pip install "vedaksha[rest]"
python -m vedaksha.rest      # FastAPI app; each tool is POST /v1/<tool_name>

Licensing

Business Source License 1.1, identical terms to the Rust engine. Non-commercial use is free. Commercial use (any product or service generating revenue from external customers) needs a one-time commercial licence, USD $500 per organisation; each release converts to Apache-2.0 four years after it ships. See LICENSE.

How it relates to the Rust engine

The Rust engine at arthiqlabs/vedaksha is normative. This package pins a specific engine commit, compiles it to wasm, and ships the blob. Version numbers track the engine. See ARCHITECTURE.md for the design and the SPK-over-wasm validation.

Metadata

Release files for vedaksha 10.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vedaksha 10.2.0
File Size Uploaded Provenance Actions
vedaksha-10.2.0.tar.gz 1.7 MB Without provenance Details for vedaksha-10.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vedaksha 10.2.0
File Interpreter ABI Platform Actions
vedaksha-10.2.0-py3-none-any.whl Python 3 none any Details for vedaksha-10.2.0-py3-none-any.whl

Total release size: 3.4 MB

Release files / vedaksha-10.2.0.tar.gz

Download URL vedaksha-10.2.0.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
f81b5724e5a258e008f3a7c1420737f2d8267276bf20827b309861a4c4d48fa4
BLAKE2b-256 checksum
How to use checksums
82355521ec104b6594206ca32a5c70701876df2cfdd87ed172219e09eaa85959
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / vedaksha-10.2.0-py3-none-any.whl

Download URL vedaksha-10.2.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
82489d9d09b413f3baaa8acb2f6569c3656d290db919df2c36ed9ef8158b146f
BLAKE2b-256 checksum
How to use checksums
de8999011cc744b603347ea5ab7ca75514f730a57fbef4e2c6402eebd9099ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for vedaksha 10.2.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.

Release history Release notifications | RSS feed

This release

10.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page