flask-route-bridge
Flask integration for route-bridge.
Define your Flask routes with metadata, emit a shared manifest, and generate a typed TypeScript frontend client automatically.
Install
pip install flask-route-bridge
Quick start
from flask import Flask
from flask_route_bridge import RouteBridge
app = Flask(__name__)
rb = RouteBridge(app, manifest_path="./route-bridge.manifest.json", url_prefix="/api")
@rb.route(
name="createUser",
method="POST",
path="/users",
body={"name": "string", "email": "string"},
response={"id": "string", "name": "string"},
)
def create_user(body, query, params, request):
return {"id": "abc", "name": body["name"]}
if __name__ == "__main__":
rb.write_manifest() # writes route-bridge.manifest.json
app.run(port=3001)
Then generate the TypeScript client:
npx route-bridge generate \
--manifest ./route-bridge.manifest.json \
--output ../frontend/src/generated
API
RouteBridge(app?, *, manifest_path, logging, url_prefix)
| Param | Type | Default | Description |
|---|---|---|---|
app |
Flask |
None |
Flask app (or pass later via init_app) |
manifest_path |
str |
./route-bridge.manifest.json |
Where to write the manifest |
logging |
bool |
True in debug mode |
Enable request logging |
url_prefix |
str |
"" |
URL prefix for all routes |
@rb.route(name, method, path, body?, query?, params?, response?, description?)
Decorator that registers a Flask route and records its metadata.
Handler signature: fn(body, query, params, request) -> dict
rb.write_manifest()
Writes the manifest to manifest_path. Call at startup.
rb.init_app(app)
Attach to a Flask app after construction (application factory pattern).
License
MIT
Metadata
Release files for flask-route-bridge 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flask_route_bridge-0.1.0.tar.gz | 7.0 kB | Without provenance | Details for flask_route_bridge-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_route_bridge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for flask_route_bridge-0.1.0-py3-none-any.whl |
Total release size: 14.6 kB
Release files / flask_route_bridge-0.1.0.tar.gz
| Download URL | flask_route_bridge-0.1.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6361f3e844c25176e50444efaf61aea8a9eadd862ec2ef08e2e60b834cd70405
|
|
BLAKE2b-256 checksum How to use checksums |
31cbad92fb3e999dbaf7c2136b903860df57122a3168ea3a0a119b7eb2f36b9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / flask_route_bridge-0.1.0-py3-none-any.whl
| Download URL | flask_route_bridge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff4052ebb24f902dbeb9880131cc9db995f997896b5207018aea19959b47182b
|
|
BLAKE2b-256 checksum How to use checksums |
524b4109db589f57721129f856f03dd14ffc5b1bd4270e2fd2e0df6015a7b601
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for flask-route-bridge 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.