Skip to main content

A modular Python application framework with manifest-driven module loading, lifecycle management, and contrib modules.

Project description

bedrock

bedrock is the runtime core of the Bedrock modular framework.

It provides manifest-driven module loading, lifecycle management, and first-party contrib modules for common capabilities.

Status

The core runtime is fully implemented and functional.

This package contains production-ready subsystems:

  • Module registry with dependency resolution and lifecycle hooks
  • Dependency injection container with singleton/transient/scoped lifetimes
  • Hook system for structured call/response extension points (sync, async, robust)
  • SQLAlchemy 2.0 database layer with Alembic migrations
  • Cache system with memory and Redis backends
  • Signal/event system (blinker-derived)
  • Typer-based CLI for module and database management
  • Comprehensive utility library (lazy loading, introspection, string helpers)

Installation

# With uv (recommended)
uv add bedrock-core

# With poetry
poetry add bedrock-core

# With pip
pip install bedrock-core

Quick Start

import bedrock

# Initialize the runtime (discovers and loads modules)
bedrock.setup()

# Access key singletons
from bedrock.module import apps          # ModuleRegistry
from bedrock.database import db          # DatabaseManager
from bedrock.contrib.cache import cache  # CacheService

Key Singletons

Singleton Class Import
apps ModuleRegistry from bedrock.module import apps
container Container from bedrock.di import container
hooks HookRegistry from bedrock.hooks import hooks
db DatabaseManager from bedrock.database import db
cache CacheService from bedrock.contrib.cache import cache

Module Structure

my_app/
├── __init__.py
├── manifest.yaml    # Module identity and dependencies
├── models.py        # SQLAlchemy models (optional)
├── entities.py      # Pydantic models for validation
├── service.py       # Business logic
├── exc.py           # Module exceptions
└── bootstrap.py     # Lifecycle hooks

Architecture

Bedrock is framework-agnostic by design. The core runtime has no HTTP dependencies and is usable in:

  • API servers (FastAPI, Flask, etc.)
  • Background workers (Celery, etc.)
  • CLI tools
  • Scripts and automation

For more details, see the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bedrock_core-0.1.1.tar.gz (73.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bedrock_core-0.1.1-py3-none-any.whl (103.1 kB view details)

Uploaded Python 3

File details

Details for the file bedrock_core-0.1.1.tar.gz.

File metadata

  • Download URL: bedrock_core-0.1.1.tar.gz
  • Upload date:
  • Size: 73.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bedrock_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b1592a81d33d9787435b0a98928cee664ff7e70fd7ef824368f2588c7daf8d06
MD5 8b52af0ff45c487568868ecf43dc875e
BLAKE2b-256 ca2a44e443c8c961fa7dd4dad4293cd3098200f23ae8b3a368e4d5da97e12f37

See more details on using hashes here.

Provenance

The following attestation bundles were made for bedrock_core-0.1.1.tar.gz:

Publisher: release.yml on maacck/bedrock-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bedrock_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bedrock_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 103.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bedrock_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f74a645c03fa0d4d57236891a507a01920329a307a598929aa1f56d85de012f
MD5 d653b910a60a629bb15e24278da4048a
BLAKE2b-256 5e2b208deb3391c7cf4b389dd2130c9a8d5fedc4cd1104aff27c1d55ac0111d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for bedrock_core-0.1.1-py3-none-any.whl:

Publisher: release.yml on maacck/bedrock-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page