stack/sdks/implementations/python
Ejiro Asiuwhu 28171d43cf feat: add sync and async HTTP client with retry logic
- BaseAPIClient generic base with header construction, URL building,
  response parsing via x-stack-actual-status and x-stack-known-error
- SyncAPIClient wrapping httpx.Client with context manager support
- AsyncAPIClient wrapping httpx.AsyncClient with async context manager
- Exponential backoff retry for idempotent methods (GET/PUT/DELETE)
- 429 rate limit handling with Retry-After header support
- POST/PUT/PATCH with no body sends {} as JSON
- All 26 tests passing
2026-03-24 22:23:56 +01:00
..
src/stack_auth feat: add sync and async HTTP client with retry logic 2026-03-24 22:23:56 +01:00
tests feat: add user, team, session, contact channel, and permission pydantic models 2026-03-24 22:23:11 +01:00
pyproject.toml test: add failing tests for python sdk error hierarchy and base model 2026-03-24 22:17:03 +01:00
README.md test: add failing tests for python sdk error hierarchy and base model 2026-03-24 22:17:03 +01:00

Stack Auth Python SDK

Python SDK for Stack Auth - authentication, user management, and team management for your Python backend.

Installation

pip install stack-auth

Quick Start

from stack_auth import StackServerApp

app = StackServerApp(
    project_id="your-project-id",
    secret_server_key="your-secret-key",
)

# Verify a request's access token
user = await app.authenticate_request(request)

Requirements

  • Python 3.10+