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.
  • Static Files and Templates: Serve static files and Jinja2 templates seamlessly.
  • Extensibility: Use FastPluggy as a library to extend your FastAPI applications.
  • Simple Setup: Configure your project with a single class, easy initialization.
  • Menu Management: Runtime control over the navigation menu — hide items, reorder, override labels, and RBAC-gate entries from the admin UI.

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.

Links

Download files

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

Source Distribution

fastpluggy-0.4.62.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

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

fastpluggy-0.4.62-py3-none-any.whl (4.1 MB view details)

Uploaded Python 3

File details

Details for the file fastpluggy-0.4.62.tar.gz.

File metadata

  • Download URL: fastpluggy-0.4.62.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for fastpluggy-0.4.62.tar.gz
Algorithm Hash digest
SHA256 a5797c2c093be1aec8f60501249875bfae3e60013c6788d14aded6e894b82e35
MD5 0e5fbf330bb295135650fdb64e463747
BLAKE2b-256 138f1d4466d0b4667a7d2b5a9f85b684720d1198b9d723453755d8eba82c84f9

See more details on using hashes here.

File details

Details for the file fastpluggy-0.4.62-py3-none-any.whl.

File metadata

  • Download URL: fastpluggy-0.4.62-py3-none-any.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for fastpluggy-0.4.62-py3-none-any.whl
Algorithm Hash digest
SHA256 a176826bb67f187e73793e9e8ebaebff54729310662cd453b358e38a1dc8bf34
MD5 dc2cbdb27f859307228853be86dde9e0
BLAKE2b-256 d79d0564861cec6f66eec70a22fe0718a08d94152c63dbce39f275deff32751e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.62 This release

2 files

0.4.51

2 files

0.4.43

2 files

0.4.37

2 files

0.4.36

2 files

0.4.27

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page