Lean Api is a class layer for FastApi
Project description
Lean Api for FastApi
LeanAPI is an interface that allows you to create a FastAPI router as a Class.
An example class structure
from leanapi.path import controller
from leanapi.server import router
@controller("personnel", router)
class Personnel:
@router.get("/get/{personnel_id}")
def get_personel(self, personnel_id: int) -> dict:
return {"personnel_id": personnel_id}
As a result definition the "/personnel/get/:personnel_id" address becomes active. "personnel_id" is a path parameter and is a of type int
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
leanapi-0.0.12.tar.gz
(4.5 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 leanapi-0.0.12.tar.gz.
File metadata
- Download URL: leanapi-0.0.12.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f14d1ddbda8bef7633a2e26369961959e27b3ae2e187fd1f6dafa060097265af
|
|
| MD5 |
af71c15bd94a604dc92c7bbd6a51577d
|
|
| BLAKE2b-256 |
e03120350cfb283c3cfb93b76c078957d00bfad91097e73ca6517c098f026f36
|
File details
Details for the file leanapi-0.0.12-py3-none-any.whl.
File metadata
- Download URL: leanapi-0.0.12-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb70a1d371d374d3e5235301f24ee4d88a7e22b518b8cdbf7e3eccf05f9a219d
|
|
| MD5 |
9acdedd592f3281730dbd8e36dea9522
|
|
| BLAKE2b-256 |
0602276f8ca173b7353e0d5a21cf6eee98b43052bf9e723ceae88971c9439418
|