https://github.com/jjj999/bamboo
General purpose framework for web apps.
https://github.com/jjj999/bamboo
api bamboo framework python web
Last synced: 6 months ago
JSON representation
General purpose framework for web apps.
- Host: GitHub
- URL: https://github.com/jjj999/bamboo
- Owner: jjj999
- License: mit
- Created: 2021-02-09T06:48:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-15T15:50:33.000Z (about 3 years ago)
- Last Synced: 2025-04-19T10:31:21.966Z (6 months ago)
- Topics: api, bamboo, framework, python, web
- Language: Python
- Homepage: https://jjj999.github.io/bamboo/
- Size: 8.55 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# bamboo
[](https://jjj999.github.io/bamboo/)
[](http://badge.fury.io/py/bamboo-core)
[](https://pypi.python.org/pypi/bamboo-core/)
[](https://jjj999.github.io/bamboo)
## Supported Interfaces
- WSGI
- ASGI v3.0 (HTTP, WebSocket and Lifespan)
## Installing
* Python: >= 3.7
```
python -m pip install bamboo-core
```
## [Usage](https://jjj999.github.io/bamboo/tutorials/concept/)
以下は簡単な実装例です.
```python
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 ドキュメントは[こちら](https://jjj999.github.io/bamboo/api/bamboo/pkg/).
## Examples
### [upsidedown](https://github.com/jjj999/bamboo/tree/main/examples/upsidedown)
リクエストされた文字列を逆順に反転させて返すアプリケーションです.
### [image_traffic](https://github.com/jjj999/bamboo/tree/main/examples/image_traffic)
アクセスに対して静的な画像を返すアプリケーションです.
### [tweets](https://github.com/jjj999/bamboo/tree/main/examples/tweets)
CLI ベースの簡易的な Twitter のような投稿アプリです.認証機能は実装されていません.