Core protocols and dependency injection for Framework M
Project description
Framework M Core
Core protocols and dependency injection container for Framework M.
Installation
pip install framework-m-core
Or with uv:
uv add framework-m-core
What's Included
Protocol Interfaces (Ports)
Framework M Core defines the protocol interfaces that adapters must implement:
| Protocol | Purpose |
|---|---|
RepositoryProtocol |
CRUD operations for documents |
EventBusProtocol |
Publish/subscribe events |
PermissionProtocol |
Authorization with RLS |
StorageProtocol |
File storage abstraction |
JobQueueProtocol |
Background job processing |
CacheProtocol |
Caching layer |
NotificationProtocol |
Email/SMS notifications |
SearchProtocol |
Full-text search |
PrintProtocol |
PDF generation |
I18nProtocol |
Internationalization |
Domain Base Classes
BaseDocType- Base class for all document typesBaseController- Lifecycle hooks (validate, before_save, after_save, etc.)SubmittableMixin- For documents with submit/cancel workflow
Dependency Injection
Built on dependency-injector for clean, testable code:
from framework_m_core.container import Container
container = Container()
container.wire(modules=["my_app.services"])
CLI Framework
Built on cyclopts for powerful command-line interfaces:
from framework_m_core.cli import app
@app.command
def my_command():
"""My custom command."""
pass
Usage
This package is typically used as a dependency of framework-m or framework-m-standard.
For most applications, install the full framework-m package instead.
License
Apache 2.0 License - see LICENSE for details.
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 framework_m_core-0.7.0.tar.gz.
File metadata
- Download URL: framework_m_core-0.7.0.tar.gz
- Upload date:
- Size: 169.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
395a362cbf79b9904339e33166e399b7201cbe8f29f2853458403b84c538daf8
|
|
| MD5 |
316227503f1cad203046c5ed308606d9
|
|
| BLAKE2b-256 |
992ae15217966cd0b1f79d49632231030a0561cc7b3eae860ed76da1f9c42c16
|
File details
Details for the file framework_m_core-0.7.0-py3-none-any.whl.
File metadata
- Download URL: framework_m_core-0.7.0-py3-none-any.whl
- Upload date:
- Size: 126.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec0324045fe13591369b652442b6834b8cb45c44bd08c16e126e36c12cc2c445
|
|
| MD5 |
bb1eefbe359f147f469e133c0fa8dacb
|
|
| BLAKE2b-256 |
5bbe2acf43ff153e5710e8b81f1c1a0177e8db7565eab97c97397d7d8b1e5f61
|