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

modules/
└── inventory/
    ├── __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.0.tar.gz (68.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.0-py3-none-any.whl (97.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bedrock_core-0.1.0.tar.gz
  • Upload date:
  • Size: 68.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.0.tar.gz
Algorithm Hash digest
SHA256 94e330a57d100c395643ca8c8ad5ca5dc525b78c691ac904ceac94b4355e43fd
MD5 e507fe3533dab639a7e82cb8f93f486d
BLAKE2b-256 e8f9957bb83fa82e0d8138916246f70b816b45e42161edeeaee1bc9d5ed1e133

See more details on using hashes here.

Provenance

The following attestation bundles were made for bedrock_core-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: bedrock_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 97.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3119d5a072592cba77a756161bc5c2065b5f4f01b895b87577247dce71a99bbc
MD5 23eb01f587a86efa593274b8ee01a6f4
BLAKE2b-256 a09803ec93550b3807d97c39ce5f9ed0906f66901039fbbfd44b3d2cc767e70b

See more details on using hashes here.

Provenance

The following attestation bundles were made for bedrock_core-0.1.0-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