// sdk · Python
AstroWay API'si için Python SDK
Resmi `astroway` PyPI'de — `Astroway` (senkron) + `AsyncAstroway` (asenkron) `httpx` üzerine. Aynı yüzey — her iki istemci上的 aynı API. Stainless tarzı hata hiyerarşisi, 408/409/429/5xx'de yeniden deneme, PEP 561 tipimli paket. Python 3.9+, Güvenilir Yayımcı OIDC.
// 01 / install
Kur
pip install astroway import: from astroway import Astroway
Kayıtta görüntüle → astroway
// 02 / highlights
Öne çıkanlar
- Senkron + asenkron istemciler
- httpx + Pydantic
- Yerleşik yeniden deneme + geri çekme
- PEP 561 tipimli
- Güvenilir Yayımcı OIDC
// 03 / first request
İlk istek
from astroway import Astroway
aw = Astroway(api_key=os.environ['ASTROWAY_API_KEY'])
chart = aw.post('/chart', body={
'date': '1990-07-14',
'time': '14:30:00',
'timezoneOffset': 3,
'latitude': 50.4501,
'longitude': 30.5234,
'houseSystem': 'P',
})
print(chart['angles']['asc']) Python ile başla
Ayda 10.000 kredi ücretsiz. Open-source SDK, OpenAPI 3.1’den oluşturulur, her zaman arka uçla senkron.