Clean-room Vedic astronomy & Jyotish engine — the Rust Vedākṣha engine hosted from Python via WebAssembly
Project description
Vedākṣha for Python
The clean-room Vedākṣha Vedic-astronomy and Jyotish engine, runnable from Python with no Rust toolchain and no per-platform build.
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()
# All 15 engine tools are available.
for tool in vk.list_tools():
print(tool["name"])
# Convenience wrappers for the common ones (analytical ephemeris tier):
chart = vk.natal_chart(julian_day=2451545.0, latitude=28.6139, longitude=77.2090)
panch = vk.panchanga(julian_day=2451545.0, latitude=28.6139, longitude=77.2090)
# Or call any tool generically:
vargas = vk.call_tool("compute_vargas", julian_day=2451545.0,
latitude=28.6, longitude=77.2)
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())
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:
# stdio (for Claude Desktop, Cursor, etc.)
python -m vedaksha.mcp
# HTTP, bearer-token auth on by default, bound to localhost
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vedaksha-4.0.0.tar.gz.
File metadata
- Download URL: vedaksha-4.0.0.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e19030bec4e8e7bc76d4bc902e10f5abeb56fe3c21aad68e0d3718fb2405a7b
|
|
| MD5 |
1f16c7fe42c2e5779d7f815721eb76b1
|
|
| BLAKE2b-256 |
e5d70b90ec2cc2236b23fa5f796960264d17fb423a553dbf50db367568ac0722
|
File details
Details for the file vedaksha-4.0.0-py3-none-any.whl.
File metadata
- Download URL: vedaksha-4.0.0-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ff92d46fa16075b13ec0db6038849e008f156370c06595bc02cf64da15e4db6
|
|
| MD5 |
140cadbed61abc60ad8a8b6e257a8ace
|
|
| BLAKE2b-256 |
cb58e020596c907d65db4d1619c06a60a608692e0e93a20ef2a9e7cc7364ceba
|