Skip to main content

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-framework

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

bamboo_framework-0.1.5.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

bamboo_framework-0.1.5-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file bamboo_framework-0.1.5.tar.gz.

File metadata

  • Download URL: bamboo_framework-0.1.5.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for bamboo_framework-0.1.5.tar.gz
Algorithm Hash digest
SHA256 462b1f264bd43bac8687dcaba2e867ff42d5423a5370faa4745882bb148e7f22
MD5 6c3c994e633e48404d87f0147d1f5dfe
BLAKE2b-256 a42597f08b1c36998b0e85a39a6e39b8e713cee9d06668b519dc70861dfecbb0

See more details on using hashes here.

File details

Details for the file bamboo_framework-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for bamboo_framework-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5c4cbe93cef81f5088ced86c9c5e7b8c324aaf3db4c7f8363f608e2d7137c254
MD5 49448df14ad41e28f725a8e1a6b65ff2
BLAKE2b-256 741ce98d0f85662b868ecd73532de1f6922f96d9fdf0929e78280bfbe90c9592

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