// sdk · Python
Python SDK ل AstroWay API
الرسمي `astroway` على PyPI — `Astroway` (متزامن) + `AsyncAstroway` (غير متزامن) على قمة `httpx`. سطح متطابق — نفس API على كلا العميلين. هرمية أخطاء من نمط Stainless، إعادة تشغيل على 408/409/429/5xx، حزمة PEP 561 نمطية. Python 3.9+، Trusted Publisher OIDC.
// 01 / install
التثبيت
pip install astroway استيراد: from astroway import Astroway
اعرض في السجل → astroway
// 02 / highlights
المميزات
- عملاء متزامن و غير متزامن
- httpx + Pydantic
- إعادة تشغيل مدمجة + تراجع
- PEP 561 نمطي
- Trusted Publisher OIDC
// 03 / first 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']) ابدأ مع Python
10,000 رصيد مجاناً شهرياً. SDK مفتوح المصدر، يتم إنشاؤه من OpenAPI 3.1، ومتزامن دائماً مع الخلفية (backend).