Metadata-Version: 2.4
Name: timeback-sdk
Version: 0.2.1b20260311201424
Summary: Timeback SDK for Python - adapters for FastAPI, Django, and more
Project-URL: Homepage, https://developer.timeback.com
Project-URL: Documentation, https://docs.timeback.com
Project-URL: Repository, https://github.com/superbuilders/timeback-dev-python
Author-email: Timeback <dev@timeback.dev>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: httpx>=0.27.0
Requires-Dist: starlette>=0.35.0
Requires-Dist: timeback-common>=0.1.0
Requires-Dist: timeback-core>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Provides-Extra: django
Requires-Dist: django>=4.0; extra == 'django'
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.100.0; extra == 'fastapi'
Description-Content-Type: text/markdown

# Timeback SDK

Server-side SDK for integrating Timeback into Python web applications.

## Installation

```bash
# pip
pip install timeback-sdk[fastapi]
pip install timeback-sdk[django]

# uv (add to a project)
uv add "timeback-sdk[fastapi]"
uv add "timeback-sdk[django]"

# uv (install into current environment)
uv pip install "timeback-sdk[fastapi]"
uv pip install "timeback-sdk[django]"
```

## FastAPI

```python
from fastapi import FastAPI
from timeback.fastapi import create_timeback_router

app = FastAPI()

timeback_router = create_timeback_router(
    env="staging",
    client_id="...",
    client_secret="...",
    identity={
        "mode": "sso",
        "client_id": "...",
        "client_secret": "...",
        "get_user": lambda req: get_session_user(req),
        "on_callback_success": lambda ctx: handle_sso_success(ctx),
    },
)

app.include_router(timeback_router, prefix="/api/timeback")
```

## Django

```python
# Coming soon
```
