A lightweight, readable Python API framework. Simple by design.
Project description
Bamboo
A lightweight, readable Python API framework. Simple by design.
Bamboo is an ASGI micro-framework you can read in one sitting and fully understand. No magic. No hidden complexity. Just clean, honest Python.
Install
pip install bambooapi
Quickstart
from bambooapi import Bamboo, Response
app = Bamboo()
@app.get("/")
async def home(request):
"""Welcome message."""
return {"message": "Hello from Bamboo"}
@app.post("/notes")
async def create_note(request):
"""Create a note."""
data = await request.json()
return Response({"note": data}, status=201)
Run it:
uvicorn myapp:app
Then visit http://localhost:8000/docs for the interactive API docs.
Features
- GET, POST, PUT, DELETE routing
- Path parameters:
/notes/{note_id} - Async request body and JSON parsing
- Auto-generated OpenAPI spec at
/openapi.json - Interactive docs page at
/docs - Zero dependencies beyond an ASGI server
Philosophy
The entire framework fits in one file you can read in an afternoon. If you can read it, you can understand it. If you can understand it, you can trust it.
License
MIT
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
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 bamboo_framework-0.1.0.tar.gz.
File metadata
- Download URL: bamboo_framework-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1065e7fdf3215e0f5a385c238bffc61a5535014fefe0507e3f2386a69b01898e
|
|
| MD5 |
b99c7f861e5bb989bfd95f2c4f6dec26
|
|
| BLAKE2b-256 |
5557eef7359a4ee46c329f7cb498544b5597adfb6c8e0a4735faa708e53cd6d9
|
File details
Details for the file bamboo_framework-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bamboo_framework-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25fc67f81d672e066cedade143ccc52fe60b22707353d2d4e4f1f5773279fb88
|
|
| MD5 |
c380d4d4076591cd988ac07abb1d87fb
|
|
| BLAKE2b-256 |
df22ebc45f1ab5ec452e4fcaeab7a1f11470a30f028686e7b052bd1f25b1bde6
|