Metadata-Version: 2.4
Name: dreamverse-core
Version: 1.0.2
Summary: Shared backend infrastructure for Dreamverse Holdings FastAPI projects
Project-URL: Homepage, https://github.com/DreamverseHoldings/dreamverse-core#readme
Project-URL: Repository, https://github.com/DreamverseHoldings/dreamverse-core
Project-URL: Issues, https://github.com/DreamverseHoldings/dreamverse-core/issues
Project-URL: Changelog, https://github.com/DreamverseHoldings/dreamverse-core/blob/master/CHANGELOG.md
Author: Dreamverse Holdings
License: MIT
Keywords: auth,dreamverse,fastapi,middleware,observability
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: fastapi<1.0,>=0.115.0
Requires-Dist: httpx<1.0,>=0.28.0
Requires-Dist: pydantic-settings<3.0,>=2.9.0
Requires-Dist: pydantic<3.0,>=2.11.0
Requires-Dist: python-dotenv<2.0,>=1.0
Requires-Dist: structlog<26.0,>=24.0
Requires-Dist: typing-extensions<5.0,>=4.10.0
Provides-Extra: all
Requires-Dist: aioboto3<14.0,>=13.0; extra == 'all'
Requires-Dist: aiosqlite<1.0,>=0.20; extra == 'all'
Requires-Dist: alembic<2.0,>=1.15.0; extra == 'all'
Requires-Dist: anyio<5.0,>=4.0; extra == 'all'
Requires-Dist: asyncpg<1.0,>=0.30.0; extra == 'all'
Requires-Dist: authlib<2.0,>=1.3; extra == 'all'
Requires-Dist: boto3<2.0,>=1.34.0; extra == 'all'
Requires-Dist: factory-boy<4.0,>=3.3; extra == 'all'
Requires-Dist: firebase-admin<7.0,>=6.0; extra == 'all'
Requires-Dist: geoalchemy2<1.0,>=0.17.0; extra == 'all'
Requires-Dist: gotrue<3.0,>=2.0; extra == 'all'
Requires-Dist: mangum<1.0,>=0.19.0; extra == 'all'
Requires-Dist: pyjwt[crypto]<3.0,>=2.10.0; extra == 'all'
Requires-Dist: pytest-asyncio<1.0,>=0.25.0; extra == 'all'
Requires-Dist: pytest-cov<7.0,>=6.0; extra == 'all'
Requires-Dist: pytest<9.0,>=8.0; extra == 'all'
Requires-Dist: redis[hiredis]<6.0,>=5.0; extra == 'all'
Requires-Dist: sentry-sdk[fastapi]<3.0,>=2.0; extra == 'all'
Requires-Dist: sqlalchemy[asyncio]<3.0,>=2.0; extra == 'all'
Requires-Dist: supertokens-python<1.0,>=0.27.0; extra == 'all'
Requires-Dist: tenacity<10.0,>=9.0.0; extra == 'all'
Provides-Extra: auth0
Requires-Dist: authlib<2.0,>=1.3; extra == 'auth0'
Requires-Dist: pyjwt[crypto]<3.0,>=2.10.0; extra == 'auth0'
Provides-Extra: aws
Requires-Dist: aioboto3<14.0,>=13.0; extra == 'aws'
Requires-Dist: boto3<2.0,>=1.34.0; extra == 'aws'
Provides-Extra: firebase
Requires-Dist: firebase-admin<7.0,>=6.0; extra == 'firebase'
Provides-Extra: lambda
Requires-Dist: mangum<1.0,>=0.19.0; extra == 'lambda'
Provides-Extra: postgis
Requires-Dist: geoalchemy2<1.0,>=0.17.0; extra == 'postgis'
Provides-Extra: postgres
Requires-Dist: alembic<2.0,>=1.15.0; extra == 'postgres'
Requires-Dist: asyncpg<1.0,>=0.30.0; extra == 'postgres'
Requires-Dist: sqlalchemy[asyncio]<3.0,>=2.0; extra == 'postgres'
Provides-Extra: redis
Requires-Dist: redis[hiredis]<6.0,>=5.0; extra == 'redis'
Provides-Extra: sentry
Requires-Dist: sentry-sdk[fastapi]<3.0,>=2.0; extra == 'sentry'
Provides-Extra: supabase-auth
Requires-Dist: gotrue<3.0,>=2.0; extra == 'supabase-auth'
Requires-Dist: pyjwt[crypto]<3.0,>=2.10.0; extra == 'supabase-auth'
Provides-Extra: supertokens
Requires-Dist: supertokens-python<1.0,>=0.27.0; extra == 'supertokens'
Requires-Dist: tenacity<10.0,>=9.0.0; extra == 'supertokens'
Provides-Extra: testing
Requires-Dist: aiosqlite<1.0,>=0.20; extra == 'testing'
Requires-Dist: anyio<5.0,>=4.0; extra == 'testing'
Requires-Dist: factory-boy<4.0,>=3.3; extra == 'testing'
Requires-Dist: pytest-asyncio<1.0,>=0.25.0; extra == 'testing'
Requires-Dist: pytest-cov<7.0,>=6.0; extra == 'testing'
Requires-Dist: pytest<9.0,>=8.0; extra == 'testing'
Description-Content-Type: text/markdown

# dreamverse-core

Shared backend infrastructure for Dreamverse FastAPI services.

## Install

The package is published to PyPI. Install it directly with the extras your service needs:

```bash
pip install dreamverse-core
pip install "dreamverse-core[supertokens,sentry,postgres]"
```

Tagged releases also attach the built wheel and source distribution to GitHub Releases for pinned or offline installs.

## Quickstart

```python
from fastapi import APIRouter
from dreamverse.app import MiddlewareConfig, create_app
from dreamverse.config import BaseAppSettings

settings = BaseAppSettings()
router = APIRouter()

@router.get("/hello")
async def hello() -> dict[str, str]:
    return {"message": "hello"}

app = create_app(
    title="Example API",
    version="1.0.0",
    settings=settings,
    routers=[router],
    middleware_config=MiddlewareConfig(),
)
```

## What it provides

- Config-driven settings with strict validation
- Unified API envelope and exception hierarchy
- Observability protocol/factory/manager stack
- Security, rate-limit, correlation, and logging middleware
- Provider-agnostic auth interfaces and dependencies
- Database engine + session dependency helpers
- Event envelope + idempotency utilities
- App factory and testing helpers

## Verification

```bash
python -m build
pytest tests/ -q
```

## Release

`dreamverse-core` uses a two-workflow release flow:

1. Run `.github/workflows/release.yml` from `master` with:
   - `tag`: `vX.Y.Z`
   - `changelog`: one bullet per line or a markdown bullet list
2. The workflow updates `pyproject.toml` and `CHANGELOG.md`, verifies the package, commits the release, and pushes the tag.
3. The tag triggers `.github/workflows/publish.yml`, which publishes to PyPI and updates the GitHub release with the built artifacts.
