Skip to main content

Next generation hybrid web framework

Project description

logo

Fubuki: Next generation hybrid web framework

Fubuki is a simple and flexible hybrid web framework. It is lightweight yet powerful, supporting rapid development. Fubuki is influenced by Laravel's features, while providing Flask-like ease of use in areas like routing. It also supports regular expressions in routes, allowing you to store arguments.

Features

  • Simple and intuitive API
  • Middleware support
  • Serving static files
  • Template engine support
  • Efficient routing
  • Flexible development with hybrid architecture
  • Features influenced by Laravel
  • LiteStar-like easy routing
  • Supports regular expressions and stores them in route arguments
  • ASGI, RSGI support ()

Installation

To install Fubuki, use the following command:

pip install fubuki

Usage

Creating a Project (WIP)

To create a new Fubuki project, run the following command:

fubuki create_project <project_name>

Directory Structure

The directory structure of a new project is as follows:

<project_name>/
├── app/
│   ├── __init__.py
│   ├── controllers/
│   │   ├── __init__.py
│   │   └── home_controller.py
│   ├── middlewares/
│   │   ├── __init__.py
│   │   └── logging_middleware.py
│   ├── static/
│   │   └── styles.css
│   ├── templates/
│   │   └── welcome.html
│   ├── routes.py
├── cli.py
├── app.py
└── main.py

Adding a Controller

To add a controller, create a new Python file in the app/controllers directory and define the routes as follows:

from fubuki import Controller, route
from fubuki.response import JSONResponse

class MyController(Controller):
    @route("/my_path")
    async def my_route(request: Request):
        return JSONResponse({"message": "Hello, World!"})

Configuring the Application

To add controllers to the application, edit the routes.py file.

from app.controllers.home_controller import UserController

def setup_routes(app):
    for controller_class in [MyController, UserController]:
        app.add_route(controller_class)

Running the Application

To run the application, execute the main.py file.

python main.py

Contributing

Contributions are welcome! You can submit bug reports, feature requests, and pull requests on the GitHub repository.

License

This project is licensed under the MIT License. For more details, see the LICENSE file.

Author

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

fubuki-0.2.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

Fubuki-0.2.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file fubuki-0.2.1.tar.gz.

File metadata

  • Download URL: fubuki-0.2.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.18.1 CPython/3.12.4 Windows/10

File hashes

Hashes for fubuki-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4f8b066bc4db6786070ca2bf9793a1c484ff2d338607b708ff4a8448c746d0c6
MD5 94d0f09d5797823b2f61ae1034f7db61
BLAKE2b-256 cc54ba191486f8ed71d54e265213607b15cc0cbc5ed43ac689e4b32735d4f8d2

See more details on using hashes here.

File details

Details for the file Fubuki-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: Fubuki-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.18.1 CPython/3.12.4 Windows/10

File hashes

Hashes for Fubuki-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1321a4efe001037f75754ff1bd3e151669829e1f347d5cfaf080ddc6f658061
MD5 3884d3a33433abe25db89acf2ad021a9
BLAKE2b-256 883da45d942dfebc6e5c24872c604be3e7366f5efa60634390108ba0c8311336

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page