// sdk · Python
SDK Python para a API AstroWay
Oficial `astroway` no PyPI — `Astroway` (sync) + `AsyncAstroway` (async) em cima do `httpx`. Superfície idêntica — a mesma API em ambos os clientes. Hierarquia de erros no estilo Stainless, repetição em 408/409/429/5xx, pacote PEP 561 tipado. Python 3.9+, Editor Confiável OIDC.
// 01 / install
Instalar
pip install astroway importar: from astroway import Astroway
Ver no registo → astroway
// 02 / highlights
Destaques
- Clientes Sync + Async
- httpx + Pydantic
- Retry + backoff incorporados
- PEP 561 tipado
- Editor Confiável OIDC
// 03 / first request
Primeiro pedido
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']) Começar com Python
10 000 créditos grátis por mês. SDK open-source, gerado a partir do OpenAPI 3.1, sempre sincronizado com o backend.