langchain-asterwise
LangChain tools for the Asterwise astrology API. Five StructuredTools over the official Python SDK:
| Tool | What it returns |
|---|---|
asterwise_natal_chart |
Vedic natal chart: planets by sign, degree, nakshatra and house; ascendant; Moon sign |
asterwise_western_natal_chart |
Western natal chart: planets, ascendant, midheaven; Placidus, Koch, Equal or Whole Sign |
asterwise_matchmaking |
Ashtakoot Guna Milan out of 36 with Rajju and Vedha as separate vetoes, Mangal dosha comparison, narrative |
asterwise_panchanga |
Tithi, nakshatra, yoga, karana, vara, sunrise and sunset, Rahu kaal for a date and place |
asterwise_numerology_profile |
Life path, expression, soul urge, personality and related numbers |
Outputs are slimmed by default to the fields a model needs to reason with. Pass slim=False for the full API payload. Birthplaces are plain text; the API geocodes them.
Install
pip install langchain-asterwise
Get a free key at asterwise.com/dashboard: 500 calls a month, no card.
Use
import os
from asterwise_langchain import AsterwiseToolkit
tools = AsterwiseToolkit(api_key=os.environ["ASTERWISE_API_KEY"]).get_tools()
With any LangChain chat model that supports tool calling:
from langchain.chat_models import init_chat_model
llm = init_chat_model("claude-sonnet-5").bind_tools(tools)
msg = llm.invoke("Cast a Vedic chart for 12 Nov 1985, 06:45, Mumbai and tell me the Moon nakshatra.")
print(msg.tool_calls)
Or as a ReAct agent with LangGraph:
from langgraph.prebuilt import create_react_agent
agent = create_react_agent(init_chat_model("claude-sonnet-5"), tools)
result = agent.invoke({"messages": [("user", "Are these two compatible? Arjun 1990-05-14 07:20 Pune; Meera 1992-11-03 22:45 Jaipur.")]})
print(result["messages"][-1].content)
The toolkit's methods also work without LangChain:
kit = AsterwiseToolkit(api_key="aw_...")
kit.matchmaking("1990-05-14", "Pune, India", "1992-11-03", "Jaipur, India")
Why the matchmaking tool reports vetoes separately
Rajju and Vedha between the two Moon nakshatras are stops in the classical method, not point deductions. A 30 out of 36 with Rajju present is not a good match, so the tool returns classical_vetoes alongside total_score and the tool description tells the model so. Background: Rajju and Vedha as hard vetoes.
Accuracy
Every Asterwise position is computed with the Swiss Ephemeris and checked against NASA JPL Horizons: 80 positions from 1950 to 2050, median difference 0.046 arcseconds, raw data and script published.
Test
pip install -e ".[test]" && pytest # offline, mocks the SDK
ASTERWISE_API_KEY=aw_... python scripts/smoke.py # one live call per tool
MIT licensed.
Metadata
Release files for langchain-asterwise 0.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 |
|---|---|---|---|---|
| langchain_asterwise-0.1.0.tar.gz | 7.4 kB | Without provenance | Details for langchain_asterwise-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_asterwise-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_asterwise-0.1.0-py3-none-any.whl |
Total release size: 14.2 kB
Release files / langchain_asterwise-0.1.0.tar.gz
| Download URL | langchain_asterwise-0.1.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33bd4010aa0fde7ad2801615da83bedf40def1fd09920343fe276c1fb7b69d3f
|
|
BLAKE2b-256 checksum How to use checksums |
2bf87f62b7961fe711cb9f2dd801dc3d814c0567128f776c925383599a733ecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / langchain_asterwise-0.1.0-py3-none-any.whl
| Download URL | langchain_asterwise-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61737005195fbc592447eb4998af0080ea70c1f21c4d4df23681cdc50c0ec751
|
|
BLAKE2b-256 checksum How to use checksums |
ab52fd9aa9feb7ac95009d32927cb2cb3146de36f569f4cb337617059f12dff5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for langchain-asterwise 0.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.