Python eDSL for your Web Routes
pip install routedsl
Compose everything in one place
routes = Routes() (
GET / 'users' / ('user_id', User, "User identifier")
| HEADERS | Headers
| RETURNS | JSON [ User ]
| HANDLER | get_user_info
| GUARDS | ( Headers.content_type | IS | 'application/json'
)
| DOCS | """Get a user profile in JSON format"""
)(
POST / 'users' / ('user_id', User)
| HEADERS | Headers
| PAYLOAD | JSON [ User ]
| RETURNS | OK [ JSON [ bool ] ]
| HANDLER | update_user_info
)
or define pieces separately, then assemble your routing map:
DefaultHeaders = HEADERS | Headers
DefaultHandler = HANDLER | default_handler
DefaultEndpoint = GET / DefaultHeaders
| DefaultHandler
routes = Routes() | DefaultEndpoint
Use nesting under common prefix
routes = (routes / 'users' / ('user_id', User)) (
POST / 'edit'
| HEADERS | Headers
| RETURNS | JSON [ User ]
| HANDLER | update_user_info
)
Read more in Official Documentation.
Metadata
Release files for routedsl 0.0.1
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 | |
|---|---|---|---|---|
| routedsl-0.0.1.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| routedsl-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / routedsl-0.0.1.tar.gz
| Download URL | routedsl-0.0.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97bb12f3a561bf9c7ff56e4519f9e9c448c73ba7c7eac705e30532c826c9e648
|
|
BLAKE2b-256 checksum How to use checksums |
d8f95c2da252a660225e1818208b91608c8689abd1bde094d827630ab5551332
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200311 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.2
|
Release files / routedsl-0.0.1-py3-none-any.whl
| Download URL | routedsl-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11496ea5d9303fc205f38e4b757f76d8f48f3c702fc88a8bc913d9613eb5e1f0
|
|
BLAKE2b-256 checksum How to use checksums |
6aff35b334327ea70f55302cd96b8d2bedf3e07aae39a6bc070a41cc3eba28f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200311 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.2
|
Security for routedsl 0.0.1
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.