Shared backend infrastructure for Dreamverse Holdings FastAPI projects
Project description
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:
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
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
- SuperTokens signup lifecycle hooks for project role validation and bindings
- Database engine + session dependency helpers
- Event envelope + idempotency utilities
- Provider-neutral LLM interface for shared adapter contracts
- Reusable LLM adapter conformance suite with recorded fixture replay
- Shared LLM provider/model registry with packaged provider catalogs
- OpenAI Chat Completions compatible LLM adapter
- Audit-log sinks, explicit recording, replay, and FastAPI middleware
- Feature-flag provider contracts, targeting context, and config-driven factories
- Cached feature-flag fallback decorator with project-owned cache repositories
- Event bus with subscribe decorators, retries, and transport overrides
- Idempotency-key stores, FastAPI middleware, and dependency helpers
- Notification provider contracts, templated sends, and delivery audit records
- Email-template registry with project override hooks
- Server-side analytics capture with PostHog and custom provider support
- Payment provider contracts for Stripe, PayFast, in-memory tests, and project overrides
- Background-job queues with retry, DLQ, audit, and event hooks
- Search provider contracts for in-memory, Meilisearch, Typesense, and project overrides
- Media upload, storage, processing, and serve-policy helpers for S3/R2-style storage
- App factory and testing helpers
Verification
python -m build
pytest tests/ -q
Release
dreamverse-core uses a two-workflow release flow:
- Run
.github/workflows/release.ymlfrommasterwith:tag:vX.Y.Zchangelog: one bullet per line or a markdown bullet list
- The workflow updates
pyproject.tomlandCHANGELOG.md, verifies the package, commits the release, and pushes the tag. - The tag triggers
.github/workflows/publish.yml, which publishes to PyPI and updates the GitHub release with the built artifacts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dreamverse_core-1.2.4.tar.gz.
File metadata
- Download URL: dreamverse_core-1.2.4.tar.gz
- Upload date:
- Size: 344.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b1946d9b6f69455003c499139ee23e36efeaec710d0a1a6e5be31f6ca625a2c
|
|
| MD5 |
5254d690ab17c7b01993b0023fdb9575
|
|
| BLAKE2b-256 |
0fffed0f61d609914288f9a34866aa5e6338ad2495b39692d98f3a6a258edca3
|
Provenance
The following attestation bundles were made for dreamverse_core-1.2.4.tar.gz:
Publisher:
publish.yml on DreamverseHoldings/dreamverse-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dreamverse_core-1.2.4.tar.gz -
Subject digest:
9b1946d9b6f69455003c499139ee23e36efeaec710d0a1a6e5be31f6ca625a2c - Sigstore transparency entry: 1709271284
- Sigstore integration time:
-
Permalink:
DreamverseHoldings/dreamverse-core@603f7c6373cf46d33e38673a3a1f9f278fb73758 -
Branch / Tag:
refs/tags/v1.2.4 - Owner: https://github.com/DreamverseHoldings
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@603f7c6373cf46d33e38673a3a1f9f278fb73758 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dreamverse_core-1.2.4-py3-none-any.whl.
File metadata
- Download URL: dreamverse_core-1.2.4-py3-none-any.whl
- Upload date:
- Size: 278.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0febc029b8299009d6b4ab3962a8731b101afb8dc1b2638073b75c364c86598
|
|
| MD5 |
88d3341110cccde1ad302069488b9baa
|
|
| BLAKE2b-256 |
9d1ae24e87d02965bfe9b42caf552f9e7815768832e79c45495ef8195c6e817a
|
Provenance
The following attestation bundles were made for dreamverse_core-1.2.4-py3-none-any.whl:
Publisher:
publish.yml on DreamverseHoldings/dreamverse-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dreamverse_core-1.2.4-py3-none-any.whl -
Subject digest:
f0febc029b8299009d6b4ab3962a8731b101afb8dc1b2638073b75c364c86598 - Sigstore transparency entry: 1709271615
- Sigstore integration time:
-
Permalink:
DreamverseHoldings/dreamverse-core@603f7c6373cf46d33e38673a3a1f9f278fb73758 -
Branch / Tag:
refs/tags/v1.2.4 - Owner: https://github.com/DreamverseHoldings
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@603f7c6373cf46d33e38673a3a1f9f278fb73758 -
Trigger Event:
push
-
Statement type: