Skip to main content

It is a simple and lightweight web framework built for learning and experimentation purposes.

Project description

BizAPI

A Lightweight Web Framework for Python


Contents


A Simple Example

Installation using a Python package manager:

pip install BizAPI
from bizapi import BizAPI
from bizapi.types import Request, Response

app = BizAPI()


@app.route('/')
def home(request: Request, response: Response):
    response.text = 'This is the home page'
gunicorn main:app

Function-Based Routing

from bizapi import BizAPI
from bizapi.types import Request, Response

app = BizAPI()


@app.route('/')
def index(request: Request, response: Response):
    response.text = "Hello World!"

Parameterized Routing

@app.route('/say-hello/{name}')
def sayhello(request: Request, response: Response, name: str):
    response.text = f"Assalawma áleykum {name}"

Allowed Methods

@app.route('/article', methods=['POST'])
def create_article(request: Request, response: Response):
    # Create a new article
    pass


@app.route('/article', methods=['GET'])
def get_article(request: Request, response: Response):
    # Get an article
    pass
@app.post('/article')
def create_product(request: Request, response: Response):
    # Create a new article
    pass


@app.get('/article')
def get_product(request: Request, response: Response):
    # Get an article
    pass

Class-Based Routing

@app.route('/article')
class Article:
    def get(request: Request, response: Response):
        # Get an article
        pass
    
    def post(request: Request, response: Response):
        # Create a new article
        pass

Features (To-Do)

Here's a list of upcoming features that will be included in BizAPI:

  • Function-Based Routing
  • Parameterized Routing
  • Allowed Methods
  • Class-Based Routing
  • Django Routes
  • Exception Handler
  • Templates
  • Static Folder
  • Custom Response
  • Middleware

License
This project is licensed under the MIT License.


Community of Lazy People

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

bizapi-0.0.4.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

BizAPI-0.0.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file bizapi-0.0.4.tar.gz.

File metadata

  • Download URL: bizapi-0.0.4.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for bizapi-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ea3727006ef3fffb91ad4ce985ff519053f682b6dc4011f900d878eb7d821c2b
MD5 e52448f0fae542eebde78eeace13cecb
BLAKE2b-256 64a372ab13aae1ba00f6dc0379ecf6ed43a75a8bc0caeee5b1839932e2b06535

See more details on using hashes here.

File details

Details for the file BizAPI-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: BizAPI-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for BizAPI-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6c96d696fc71c0abfce074b02e753d1e5ad9adab29b8608612964aec196fa76f
MD5 c5396bafc17028884c3c333e5052b4ee
BLAKE2b-256 c1d8de62cf4d64787c50a4feb2d6986bf1ff5d3ce1e8c91b05cc8fe31878a5d9

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