General purpose server framework in Python
Project description
bamboo
Installling
- Python: >= 3.8
$ python -m pip install bamboo-core
Usage
詳細なドキュメントはこちらを参照してください.以下は簡単な実装例です.
from bamboo import App, Endpoint, TestExecutor
app = App()
@app.route("hello")
class MockEndpoint(Endpoint):
def do_GET(self) -> None:
self.send_body(b"Hello, World!")
if __name__ == "__main__":
TestExecutor.debug(app, "debug_app.log")
実行後,ブラウザで http://localhost:8000/hello にアクセスしてみましょう.
API documentation
Bamboo の 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.4.1.tar.gz
(32.9 kB
view hashes)
Built Distribution
Close
Hashes for bamboo_core-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e61e8017773e59fbad27b209c9169c7f6de5fd98f0130731c2c6c63df0e31ce |
|
MD5 | b58feec00ede5e781ae6505ee87fcb4a |
|
BLAKE2b-256 | 38a6ab620bc8b95fd3e24e35b5a26557b56659a4b8a5b5de3e99058bef73a9a9 |