General purpose server framework in Python
Project description
Bamboo
Installling
- Python: >= 3.8
$ 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.7.1.tar.gz
(47.8 kB
view hashes)
Built Distribution
Close
Hashes for bamboo_core-0.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a7e12e733df1d4e293b345e2aff210b7213e8a8914fc0b34831d2c6786765ba |
|
MD5 | d3d097cd9017bc6ab5e7f4860c7097c3 |
|
BLAKE2b-256 | 9cf1060c08eaa8b16faa74096e522f2db77eb03d06c91fb5c8eee9a09cb06c23 |