Python SDK for Odin's Oracle API - cosmic intelligence and Agent Soul Protocol for AI agents
Project description
Odin's Oracle Python SDK
"Ancient wisdom meets modern intelligence."
The official Python SDK for Odin's Oracle — integrate astrological wisdom into your applications with ease.
Features
- ✨ Complete Natal Charts — Calculate full natal charts with planetary positions, houses, and aspects
- 🌙 Transit Analysis — Analyze current planetary transits against any natal chart
- 🔮 Rune Glyphs — Generate unique sigils derived from chart data
- ⚡ Async Support — Full async/await support for high-performance applications
- 📝 Type Hints — Complete type annotations for excellent IDE support
- 🛡️ Error Handling — Comprehensive exceptions for all error cases
Installation
# Sync client only (uses requests)
pip install odins-oracle[sync]
# Async client only (uses httpx)
pip install odins-oracle[async]
# Both sync and async
pip install odins-oracle[all]
Quick Start
from odins_oracle import OracleClient
# Initialize client
client = OracleClient(api_key="your_api_key")
# Calculate natal chart
chart = client.natal_chart(
birth_date="1990-06-15",
birth_time="14:30",
latitude=41.8781,
longitude=-87.6298
)
# Access chart data
print(f"Sun: {chart.sun.sign}") # Gemini
print(f"Moon: {chart.moon.sign}") # Virgo
print(f"Rising: {chart.rising.sign}") # Libra
print(f"Rune Glyph: {chart.rune_glyph}") # ᚠᚢᚦᚨ
# Get all planets
for planet in chart.planets:
print(f"{planet.glyph} {planet.sign} {planet.degree}°")
# Find aspects
for aspect in chart.aspects[:5]:
print(f"{aspect.planet1} {aspect.aspect_type} {aspect.planet2}")
Async Usage
import asyncio
from odins_oracle import OracleClient
async def main():
async with OracleClient(api_key="your_api_key") as client:
chart = await client.anatal_chart(
birth_date="1990-06-15",
birth_time="14:30",
latitude=41.8781,
longitude=-87.6298
)
print(chart.chart_signature)
asyncio.run(main())
Transit Analysis
# Calculate transits for today
transits = client.transits(natal_chart_id=chart_id)
# Get significant transits
for transit in transits.significant_transits:
print(f"{transit.transiting_planet} {transit.aspect_type} your {transit.natal_planet}")
# Check transits to specific planet
moon_transits = transits.get_transits_to("moon")
Advanced Usage
Working with Houses
# Get planets in a specific house
first_house_planets = chart.get_planets_in_house(1)
# Get house cusp
second_house = chart.get_house(2)
print(f"2nd House: {second_house.sign} {second_house.degree}°")
Finding Aspects
# Get all aspects involving the Sun
sun_aspects = chart.get_aspects_to("sun")
# Filter by aspect type
squares = [a for a in chart.aspects if a.aspect_type == "Square"]
Error Handling
from odins_oracle import (
OracleClient,
AuthenticationError,
RateLimitError,
ValidationError,
)
try:
chart = client.natal_chart(
birth_date="invalid-date", # Will raise ValidationError
birth_time="14:30",
latitude=41.8781,
longitude=-87.6298
)
except ValidationError as e:
print(f"Validation failed: {e.message}")
print(f"Errors: {e.errors}")
except AuthenticationError:
print("Invalid API key")
except RateLimitError:
print("Rate limit exceeded - try again later")
API Reference
OracleClient
The main client class for interacting with the API.
Constructor
OracleClient(
api_key: str,
base_url: Optional[str] = None,
timeout: float = 30.0
)
Methods
natal_chart(...)— Calculate a complete natal charttransits(natal_chart_id, date=None)— Calculate transitsplanets()— List all supported planetsanatal_chart(...)— Async version of natal_chartatransits(...)— Async version of transitsaplanets()— Async version of planets
Models
NatalChart— Complete chart with planets, houses, aspectsPlanetPosition— Individual planet position dataChartSignature— Quick reference (Sun, Moon, Rising, MC)Aspect— Planetary aspect dataTransit— Transit analysis results
Documentation
Full documentation is available at odins-oracle.com/docs/python
License
MIT License — see LICENSE for details.
Built with ᛟ by Odin's Eye Enterprises
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 odins_oracle-2.0.0.tar.gz.
File metadata
- Download URL: odins_oracle-2.0.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
339cbdaafcf121fed5258c986eafebad27d0c44834922454ac7648bea05c6555
|
|
| MD5 |
01ef193c9bd1940682c4fdb06e1e89f7
|
|
| BLAKE2b-256 |
78f8c3292626a6d6c33c24d99c3cf761df282aeec5d5731857361c5ad449622b
|
File details
Details for the file odins_oracle-2.0.0-py3-none-any.whl.
File metadata
- Download URL: odins_oracle-2.0.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cace3f6aa569caeb5553c2f28c267046e2bb88663db157d25fa86eb2172b9cae
|
|
| MD5 |
5c7ac7ae75896fdb415834298756a42b
|
|
| BLAKE2b-256 |
9c90f182c037b0babf7569cc22bbe9160152821100d85697222143d07dcfa10b
|