```python
import tornado.ioloop
import tornado.web
from toroute import route
@route('/')
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
@route('/login', name='login')
class LoginHandler(tornado.web.RequestHandler):
def get(self, *args, **kwargs):
self.write('login')
# group by `/blog`, e.g.: blog app
@route('/list', name='blog_list', kwargs={'data': 'hello'}, group='/blog')
class BlogListHandler(tornado.web.RequestHandler):
def initialize(self, **kwargs):
self.data = kwargs.get('data', None)
def get(self, *args, **kwargs):
self.write(self.data)
@route('/post', name='blog_post', group='/blog')
class BlogPostHandler(tornado.web.RequestHandler):
def get(self, *args, **kwargs):
print('post complete! redirect:%s' % route.url_for('blog_list'))
self.redirect(route.url_for('blog_list'))
@route(r'/view/(?P<pid>\d+)/detail', name='blog_view', group='/blog')
class BlogViewHandler(tornado.web.RequestHandler):
def get(self, pid, **kwargs):
msg = 'Handle Class for /blog/list is %s' \
% route.get_handler_class('/list', group='/blog').__name__
self.write(msg)
if __name__ == '__main__':
application = tornado.web.Application([
(r"/", MainHandler),
] + route.routes())
application.listen(8000)
tornado.ioloop.IOLoop.current().start()
```
Metadata
Release files for torroute 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 | Actions |
|---|---|---|---|---|
| torroute-0.0.1.tar.gz | 1.4 kB | Without provenance | Details for torroute-0.0.1.tar.gz |
Release files / torroute-0.0.1.tar.gz
| Download URL | torroute-0.0.1.tar.gz |
|---|---|
| Size | 1.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43b74b6a271981fccdc444557cdf1ef4a0f455cd9f5e63add50415b9c5d7f0f1
|
|
BLAKE2b-256 checksum How to use checksums |
a9b2b5f6b653ff074d961579e7277f4dc2b75e4fd7953c4042ab69d2249eab8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for torroute 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.