Skip to main content

FastPluggy

Core Release Pipeline Status Coverage

FastPluggy is a FastAPI-based framework that simplifies the process of building modular applications with plugin management and database handling. It allows you to easily configure plugins, static files, Jinja2 templates, and databases, making it a powerful and flexible solution for FastAPI projects.

Features

  • Plugin Management: Easily manage, enable, disable, and configure plugins.
  • Database Integration: Supports SQLAlchemy for database handling with connection pooling and health checks.
  • Event Bus: Plugin-to-plugin communication via typed events with ownership-scoped subscriptions.
  • Static Files and Templates: Serve static files and Jinja2 templates seamlessly.
  • Menu Management: Runtime control over the navigation menu — hide items, reorder, override labels, and role-gate entries from the admin UI.
  • Topbar Actions: Plugin-configurable icon buttons in the admin topbar.
  • Authentication & Authorization: Pluggable auth backends with role-based access control and custom role-check seams.
  • Health Probes: Built-in /health (liveness) and /ready (readiness) endpoints for orchestrators and monitoring.
  • Extensibility: Use FastPluggy as a library to extend your FastAPI applications.
  • Customization: Configure app branding (name, subtitle, logo icon) via settings or environment variables.
  • Simple Setup: Configure your project with a single class, easy initialization.

Installation

You can install FastPluggy using pip:

pip install FastPluggy

Getting Started

1. Create a FastAPI App with FastPluggy

In your FastAPI project, import FastPluggy from FastPluggy and use it to configure your app:

from fastapi import FastAPI
from fastpluggy.fastpluggy import FastPluggy

app = FastAPI()

# Initialize the FastPluggy class which sets up everything
fast_pluggy = FastPluggy(app)

# Run the application using Uvicorn or another ASGI server
if __name__ == "__main__":
    import uvicorn
    uvicorn.run(fast_pluggy.app, host="0.0.0.0", port=8000)

2. Running the Application

Once the configuration is complete, you can run the FastAPI app using Uvicorn:

uvicorn your_project:app --reload

3. Plugin Management

With FastPluggy, managing plugins is straightforward. The PluginManager class handles loading, enabling, disabling, and configuring plugins in your application. You can define plugins and control their behavior from the admin interface or directly in code.

Example Plugin Definition

To create a plugin, simply create a Python module with a FastAPI router and define plugin-specific functionality.

from fastapi import APIRouter

plugin_router = APIRouter()

@plugin_router.get("/hello")
def hello_plugin():
    return {"message": "Hello from the plugin!"}

FastPluggy will automatically detect and integrate this plugin into your application.

File Structure

After installing FastPluggy, your project structure might look like this:

your_project/
│
├── src/
│   ├── your_project/
│   │   ├── __init__.py
│   │   ├── main.py
│   │   ├── core/
│   │   ├── templates/
│   │   ├── static/
│   └── your_project.egg-info/
│
├── tests/
├── README.md
├── setup.py
└── pyproject.toml
  • main.py: Entry point for your application.
  • core/: Core logic for plugins, database handling, etc.
  • templates/: Jinja2 templates for rendering HTML.
  • static/: Static files like CSS and JavaScript.
  • tests/: Directory for unit tests.

Contributing

Contributions are welcome! If you'd like to contribute to FastPluggy, please fork the repository and submit a pull request. Be sure to follow the contribution guidelines.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Metadata

Release files for FastPluggy 0.4.96

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

Source distribution (sdist)

Source distribution for FastPluggy 0.4.96
File Size Uploaded Provenance Actions
fastpluggy-0.4.96.tar.gz 4.2 MB Without provenance Details for fastpluggy-0.4.96.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for FastPluggy 0.4.96
File Interpreter ABI Platform Actions
fastpluggy-0.4.96-py3-none-any.whl Python 3 none any Details for fastpluggy-0.4.96-py3-none-any.whl

Total release size: 8.4 MB

Release files / fastpluggy-0.4.96.tar.gz

Download URL fastpluggy-0.4.96.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3919ddf1838d05435db595b1b1b627a3ab8b3e0396dc453ec5ee0b95b0c54b00
BLAKE2b-256 checksum
How to use checksums
658ef7d16599ffc59b3c3168b660cfa488e77a0312acbbc66cafab25f942461e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / fastpluggy-0.4.96-py3-none-any.whl

Download URL fastpluggy-0.4.96-py3-none-any.whl
Size 4.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4374e95e2b5e15bafef00d0511228bb410a42737b91f76c880775e42ba00b9b1
BLAKE2b-256 checksum
How to use checksums
aa918e3d74bafb12a83d26027b3c3722ec6da8917703fdbdf51d20b7d4889492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for FastPluggy 0.4.96

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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