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.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

Fubuki-0.2.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fubuki-0.2.0.tar.gz
  • Upload date:
  • Size: 11.0 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.0.tar.gz
Algorithm Hash digest
SHA256 f9fa1c921594e7eb1409ccc5ac9c3a464373c2f68262b98174b11f31935dc4e8
MD5 14b1531bb615a0384c48b9ab40bdb0c0
BLAKE2b-256 024991037c35a7613a1895725f644bf245282e7b2e0c2e3519a5c705db9f5349

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Fubuki-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5db61f3d9ef3d0578a57048e87bc6b812c757858b8524da8358616e1c6352f2d
MD5 fbd495badb0b3a8978dc8363e2163c11
BLAKE2b-256 2786356133a2957f2e2b8b9e7805d3e124118e107c8d56d9c91dca7101864100

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