Skip to main content

Core protocols and dependency injection for Framework M

Project description

Framework M Core

PyPI version Python 3.12+ License GitLab Pipeline Status

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 types
  • BaseController - 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


Download files

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

Source Distribution

framework_m_core-0.9.0.tar.gz (177.5 kB view details)

Uploaded Source

Built Distribution

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

framework_m_core-0.9.0-py3-none-any.whl (131.8 kB view details)

Uploaded Python 3

File details

Details for the file framework_m_core-0.9.0.tar.gz.

File metadata

  • Download URL: framework_m_core-0.9.0.tar.gz
  • Upload date:
  • Size: 177.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for framework_m_core-0.9.0.tar.gz
Algorithm Hash digest
SHA256 900267855852e737543db4ed5e019d65f960cd33dc708a60c493b4cce7bf21e0
MD5 a1fd5af5fc3b3a8f670ca7350f722cc8
BLAKE2b-256 1430e4afa4b2dd86f69f4cec3cdcc9e1480b11734534be0cd36083aeb9d54bbe

See more details on using hashes here.

File details

Details for the file framework_m_core-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for framework_m_core-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49a4c12f75c454bcef241c295867a2880a4a282b05bf55a2a5a193b08180e9a4
MD5 502f03f8e0c61357ac7f3314cecc72af
BLAKE2b-256 f39cedfdc1ead4f1db64ae72a431a4aae826a230a4e8765d55fabfe5455cf9d8

See more details on using hashes here.

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