// sdk · Python
Python SDK pentru AstroWay API
Oficial `astroway` pe PyPI — `Astroway` (sync) + `AsyncAstroway` (async) pe `httpx`. Suprafață identică — aceeași API pe ambele client. Ierarhie de erori în stil Stainless, retry la 408/409/429/5xx, pachet tipizat PEP 561. Python 3.9+, Editor de încredere OIDC.
// 01 / install
Instaleaz
pip install astroway import: from astroway import Astroway
Vezi n registru → astroway
// 02 / highlights
Caracteristici
- Clienți Sync + Async
- httpx + Pydantic
- Retry încorporat + backoff
- PEP 561 tipizat
- Editor de încredere OIDC
// 03 / first request
Primul request
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']) Start cu Python
10 000 de credite gratuite pe lun. SDK open-source, generat din OpenAPI 3.1, mereu sincronizat cu backend-ul.