Decorouter
Decorouter is a WSGI routing apparatus that makes it easy to define routes using decorator syntax.
Example:
from decorouter import Router
class MyApplication:
router = Router()
@router.add('/$')
def index(self, environ, start_response):
start_response('200 OK', [('Content-type', 'text/plain')])
return ['Hello, world!']
@router.add('/hello/([^/]+)$')
def index(self, environ, start_response):
args, kwargs = environ['wsgiorg.routing_args']
(name,) = args
start_response('200 OK', [('Content-type', 'text/plain')])
return ['Hello, %s!' % (name,)]
def __call__(self, environ, start_response):
return self.router(environ, start_response)
if __name__ == '__main__':
from wsgiref.simple_server import make_server
make_server('', 8000, MyApplication()).serve_forever()
Metadata
Release files for decorouter 0.0.2
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 |
|---|---|---|---|---|
| decorouter-0.0.2.tar.gz | 3.4 kB | Without provenance | Details for decorouter-0.0.2.tar.gz |
Release files / decorouter-0.0.2.tar.gz
| Download URL | decorouter-0.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
318f77aedc3b04db3e9868c9d20195e8728650eaac27621b3ebb1d9d452067dd
|
|
BLAKE2b-256 checksum How to use checksums |
97ee40430afdb21012965bd197b3c7ec95444e8ebb84ebb9a4af516596028506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for decorouter 0.0.2
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.