A general framework for the Wolfrahm projects. Logging is the first capability; more will follow.
| Capability | Status | Documentation |
|---|---|---|
| Logging | shipping | docs/logging.md |
| Starlette | shipping | docs/starlette.md — rahm.starlette |
| Falcon | shipping | docs/falcon.md — rahm.falcon |
| Robyn | shipping | docs/robyn.md — rahm.robyn |
From GitHub, into your own project:
uv add "rahm @ git+https://github.com/Wolfrahm/rahm_lib_py.git"
uv add "rahm[starlette] @ git+https://github.com/Wolfrahm/rahm_lib_py.git"
uv add "rahm[falcon] @ git+https://github.com/Wolfrahm/rahm_lib_py.git"
uv add "rahm[robyn] @ git+https://github.com/Wolfrahm/rahm_lib_py.git"
uv add "rahm @ git+https://github.com/Wolfrahm/rahm_lib_py.git@v0.0.1" # pinned to a tagEach extra is independent — install only what you use.
Inside this repo (development):
uv sync # runtime only (logging)
uv sync --extra starlette # + starlette + uvicorn
uv sync --extra falcon # + falcon (WSGI + ASGI)
uv sync --extra robyn # + robynimport rahm
rahm.log.info('order_placed', 'order placed', order_id='O-1001', amount=49.99)
rahm.log.error('payment_failed', 'payment failed', order_id='O-1001')That's the whole logging surface in two lines. See docs/logging.md for everything else: env vars, output formats, domains, scopes, exception capture, uncaught hooks, customizing formatters.
demo/ holds runnable scripts you can python -m:
| Script | Capability | What it shows |
|---|---|---|
demo/log_cli.py |
logging | severities, scopes + bind/unbind, domain filtering, auto-capture, hooks |
demo/log_json.py |
logging | vanilla JsonFormatter + a customer subclass |
demo/log_logfmt.py |
logging | vanilla LogfmtFormatter + a customer subclass |
demo/log_starlette.py |
starlette | uvicorn + Starlette + RahmHttpMiddleware |
demo/log_falcon_granian.py |
falcon | Falcon WSGI on Granian + RahmFalconMiddleware + rahm_error_handler |
demo/log_falcon_gunicorn_*.py |
falcon | Falcon WSGI on gunicorn — one script each for sync / gthread / gevent |
demo/log_robyn.py |
robyn | real Robyn server + install_rahm(app) |
uv run --env-file .env python -m demo.log_cliuv run pytestMIT. Repository: https://github.com/Wolfrahm/rahm_lib_py.