Skip to main content

A batteries-included REST framework for FastAPI.

Project description

FastAPI REST Framework

A batteries-included REST framework for FastAPI.
This project aims to provide a Django-like experience (class-based endpoints, built-in pagination, security helpers, etc.) on top of FastAPI’s asynchronous capabilities.

Status: Alpha (Under Active Development)

Features

  • Class-Based Endpoints
    Define your API routes in classes rather than large function-based modules.
  • Single or Bulk Registration
    Include endpoints with minimal boilerplate.
  • Extendable
    Built to be extended with future components, such as database integrations, pagination, security layers, etc.

Quick Start

Installation

pip install fastapi-rf

Requires Python 3.12+ and FastAPI 0.115.6+.

Usage Example

  1. Assuming you have a FastAPI project:

    # project/main.py
    
    from fastapi import FastAPI
    from frf.routers.base_router import BaseAPIRouter
    from frf.endpoints.base_endpoint import BaseEndpoint
    
    app = FastAPI()
    router = BaseAPIRouter()
    
    class MyEndpoint(BaseEndpoint):
        prefix = "/items"
        tags = ["Items"]
    
        @BaseEndpoint.route("/list", "GET")
        async def get_items(self):
            return {"message": "List of items"}
    
        @BaseEndpoint.route("/create", "POST")
        async def create_item(self, data: dict):
            return {"message": "Item created", "data": data}
    
    # Register the endpoint
    router.include_endpoints(MyEndpoint)
    app.include_router(router)
    
  2. Run the application:

    uvicorn project.main:app --reload
    
  3. Open http://127.0.0.1:8000/docs to see the automatically generated API documentation and test your new endpoints.


Roadmap

  • ORM Integration
    Seamless database handling, migrations, and a Django-like “model” layer.
  • Pagination, Security, & Schemas
    Built-in solutions for typical REST concerns.

Contributing

Contributions, feature requests, and bug reports are welcome. Feel free to open an issue or submit a PR. Please follow typical open-source etiquette (fork, branch, test, PR).

License

This project is licensed under the MIT License.


Thank you for using fastapi-rf! If you have any questions, suggestions, or feedback, feel free to open an issue.

Download files

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

Source Distribution

fastapi_rf-0.1.0a3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

fastapi_rf-0.1.0a3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_rf-0.1.0a3.tar.gz.

File metadata

  • Download URL: fastapi_rf-0.1.0a3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.22.0 CPython/3.13.1 Darwin/24.2.0

File hashes

Hashes for fastapi_rf-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 dd136ce2244ccf598467ee6fb832f421f5cf8fb2854adbe758ff57929f64e655
MD5 a914e058fef67350cd963f229f23a6a2
BLAKE2b-256 bea694f00fde0ca9475cb5355230fd4e4aa42e2b3f44757660106927081f1ec7

See more details on using hashes here.

File details

Details for the file fastapi_rf-0.1.0a3-py3-none-any.whl.

File metadata

  • Download URL: fastapi_rf-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.22.0 CPython/3.13.1 Darwin/24.2.0

File hashes

Hashes for fastapi_rf-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 2729d3b62f52d93abdaa18dd2459cc46a4e0bf9af96d315147b63ac4275040a4
MD5 5a41a5c08605c8719e975cdcfc7b107f
BLAKE2b-256 b85b95c14787e4385ced5b7e39db1aa33b8051e1790defdf74b8c16a1f3e06de

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