General purpose server framework in Python
Project description
Bamboo
Supported Interfaces
- WSGI
- ASGI v3.0 (HTTP, WebSocket and Lifespan)
Installling
- Python: >= 3.7
$ python -m pip install bamboo-core
Usage
以下は簡単な実装例です.
from bamboo import WSGIApp, WSGIEndpoint, WSGITestExecutor
app = WSGIApp()
@app.route("hello")
class MockEndpoint(WSGIEndpoint):
def do_GET(self) -> None:
self.send_body(b"Hello, World!")
if __name__ == "__main__":
WSGITestExecutor.debug(app)
上記スクリプトを実行後,ブラウザで http://localhost:8000/hello にアクセスするとレスポンスを確認できます.
API documentation
API ドキュメントはこちら.
Examples
upsidedown
リクエストされた文字列を逆順に反転させて返すアプリケーションです.
image_traffic
アクセスに対して静的な画像を返すアプリケーションです.
tweets
CLI ベースの簡易的な Twitter のような投稿アプリです.認証機能は実装されていません.
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
bamboo_core-0.9.2.tar.gz
(53.4 kB
view hashes)
Built Distribution
bamboo_core-0.9.2-py3-none-any.whl
(115.3 kB
view hashes)
Close
Hashes for bamboo_core-0.9.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9667481975b525e7e8600ccf24103d518e06de8b316d227177022894f9c0113 |
|
MD5 | 57d050e703ffd83015615e5df9236d03 |
|
BLAKE2b-256 | b8c0bcaf06a9e2061828b8e580444492ecca81b65d60248edd268f092fdd12e3 |