Skip to main content

simple_module_core

Module-system primitives for the simple_module framework — a modular-monolith for Python/FastAPI where each feature is a plugin package discovered at boot.

This package defines ModuleBase, the ModuleMeta descriptor, the discover_modules() entry-point loader, topological dependency sorting, event bus primitives, and the diagnostic codes (SM001–SM025) used by make doctor.

Install

pip install simple_module_core

You usually don't install this directly — it's pulled in by simple_module_hosting and every simple_module_* module.

What it provides

  • ModuleBase — the subclass every module extends to opt into lifecycle hooks.
  • ModuleMeta — required meta = ModuleMeta(name=..., depends_on=...) attribute on each module.
  • discover_modules() — loads all [project.entry-points.simple_module] modules, topologically sorts by depends_on.
  • Diagnostic registry — SM001 missing meta, SM003 orphan page, SM008 duplicate name, SM009 framework→plugin coupling violation, and the rest of the SM0xx set through SM025.
  • Tenant-role vocabulary (simple_module_core.access.tenancy) — TenantRole, TENANT_ROLE_PREFIX, tenant_role(), so any module can map tenant:<role> onto its permissions without depending on tenants.
  • Tiny event-bus (pyee) for decoupled module-to-module communication.

Usage

# modules/orders/orders/module.py
from simple_module_core import ModuleBase, ModuleMeta


class OrdersModule(ModuleBase):
    meta = ModuleMeta(name="orders", depends_on=["users"])

    def register_routes(self, api_router, view_router):
        from .endpoints import api, views

        api_router.include_router(api.router)
        view_router.include_router(views.router)

And in pyproject.toml:

[project.entry-points.simple_module]
orders = "orders.module:OrdersModule"

The host's discover_modules() call picks this up automatically at boot.

Depends on

  • fastapi, pydantic, pydantic-settings, pyee, babel, packaging

License

MIT — see LICENSE.

Metadata

Release files for simple-module-core 0.0.52

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-module-core 0.0.52
File Size Uploaded Provenance Actions
simple_module_core-0.0.52.tar.gz 236.2 kB With provenance Details for simple_module_core-0.0.52.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simple-module-core 0.0.52
File Interpreter ABI Platform Actions
simple_module_core-0.0.52-py3-none-any.whl Python 3 none any Details for simple_module_core-0.0.52-py3-none-any.whl

Total release size: 451.9 kB

Release files / simple_module_core-0.0.52.tar.gz

Download URL simple_module_core-0.0.52.tar.gz
Size 236.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9c760eb479d97f4a45ffd15babf13efd381dc4b63ef215819e3a6070d977a7e4
BLAKE2b-256 checksum
How to use checksums
caa4b026e4d096e0bb76a427d370c67db94436dfe8aba533cb475d69551adb83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / simple_module_core-0.0.52-py3-none-any.whl

Download URL simple_module_core-0.0.52-py3-none-any.whl
Size 215.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7716cff9573cf45acfdb1a3600cad83dafba730c69f8ca75d9315a3d3e7100a
BLAKE2b-256 checksum
How to use checksums
4728d12e66f57f455eee60bfdf3f4b980537f9d9d147f93448b9e6c4b3a0f47d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Security for simple-module-core 0.0.52

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for simple_module_core-0.0.52.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.52 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page