It is a simple and lightweight 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'
@app.route('/say-hello/{name}')
def sayhello(request: Request, response: Response, name: str):
response.text = f"Assalawma áleykum {name}"
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('/article', methods=['POST'])
def create_article(request: Request, response: Response):
pass
@app.route('/article', methods=['GET'])
def get_article(request: Request, response: Response):
pass
@app.post('/product')
def create_product(request: Request, response: Response):
pass
@app.get('/product')
def get_product(request: Request, response: Response):
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.
Project details
Release history Release notifications | RSS feed
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.3.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bizapi-0.0.3.tar.gz.
File metadata
- Download URL: bizapi-0.0.3.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f70b338b6be0281ed3e0dbbaf20e6d8a4b3be66e504def3c67fdab97aed23fe3
|
|
| MD5 |
cec61cabfc7da88a2a8009cfd3090f08
|
|
| BLAKE2b-256 |
023c4d529fce50cbc35b1edf3d70f4a5807a0765fbcc416c3f29a277bb244d60
|
File details
Details for the file BizAPI-0.0.3-py3-none-any.whl.
File metadata
- Download URL: BizAPI-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff91414d64db46b070698f075e35fe7820c01546057c6535adca9bf51b9d08c0
|
|
| MD5 |
7d48e737d9c50770b5280899e64a707e
|
|
| BLAKE2b-256 |
10146d87eb173b1afae67f865f2a080d2c1e6038ca12f48a42e568a1037ed30d
|