General purpose server framework in Python
Project description
Bamboo
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.8.0.tar.gz
(50.7 kB
view hashes)
Built Distribution
Close
Hashes for bamboo_core-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03028611221f710838ea6a43d3a00b33941ce0bb02f628e75063cba2f2fdfc7a |
|
MD5 | 2223970d392388292e43d17f19841973 |
|
BLAKE2b-256 | a6ab0280ce269f313abf7ac76bbbbebd0932a47baf36f77655109be1fb46bae5 |