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 (VSOP87A, ELP/MPP02, JPL DE440s/DE441).

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 — verified bit-for-bit against the native build, including the sub-arcsecond 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 / kundali (analytical ephemeris tier).
# 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)

# 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)

Sub-arcsecond positions (SPK tier)

The tool surface uses the built-in analytical ephemeris (< 25″ planets, < 1″ Moon), which needs no data files. For sub-arcsecond accuracy, supply a JPL DE440s 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
vedaksha call compute_vargas --args '{"julian_day":2451545.0,"latitude":28.6,"longitude":77.2}'

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 — what the MCP Registry launches
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

Unlike the Rust engine's HTTP server, this one requires auth by default and 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. Production deployment is a commercial use — confirm your commercial licence before go-live.

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 docs/ for the design and the SPK-over-wasm validation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedaksha-9.3.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vedaksha-9.3.0-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file vedaksha-9.3.0.tar.gz.

File metadata

  • Download URL: vedaksha-9.3.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for vedaksha-9.3.0.tar.gz
Algorithm Hash digest
SHA256 141239031dbaec3968888f3de5d515e320098b9b540aa24d658a2b3c28414ebf
MD5 863e3660897bee36d84ba6a06e0bedd6
BLAKE2b-256 b750879f40c8c59ffac78f56d4a461ae44f1e50749fd2e7cbcf526b7abe7b811

See more details on using hashes here.

File details

Details for the file vedaksha-9.3.0-py3-none-any.whl.

File metadata

  • Download URL: vedaksha-9.3.0-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for vedaksha-9.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a759188e3829b46684eeb40e82d18bf2ec5690590eebba94443eefef06e8652
MD5 19be9ffacfb5079758df66012ca824ea
BLAKE2b-256 a959dd1091b910d01f3912278fed2fad4e3eb533ed9dea594f6ec9e12f58fbc3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

9.3.0 This release

2 files

9.2.0

2 files

9.1.1

2 files

9.1.0

2 files

9.0.0

2 files

8.1.0

2 files

8.0.0

2 files

7.6.0

2 files

7.5.0

2 files

7.4.0

2 files

7.3.1

2 files

7.3.0

2 files

7.2.0

2 files

7.1.1

2 files

7.1.0

2 files

7.0.0

2 files

6.1.0

2 files

6.0.1

2 files

6.0.0

2 files

5.0.2

2 files

5.0.1

2 files

5.0.0

2 files

4.0.0

2 files

3.2.1

1 file

3.0.1

1 file

2.6.0

1 file

2.5.0

1 file

2.3.0

1 file

2.2.0

1 file

2.1.0

1 file

2.0.0

1 file

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