a profile tool for tornado web requesthandler
Project description
Usage:
======
use `tprofile.ProfileMeta' as the metaclass of handler subclass or base handler class.
Example:
..code::python
import tornado.web
from tprofile import ProfileMeta
def condition(self):
return True if self.get_argument('profile', None) == "1" else False
ProfileMeta.set_condition(condition)
class BaseHandler(tornado.web.RequestHandler):
__metaclass__ = ProfileMeta
class MainHandler(BaseHandler):
def get(self):
pass
======
use `tprofile.ProfileMeta' as the metaclass of handler subclass or base handler class.
Example:
..code::python
import tornado.web
from tprofile import ProfileMeta
def condition(self):
return True if self.get_argument('profile', None) == "1" else False
ProfileMeta.set_condition(condition)
class BaseHandler(tornado.web.RequestHandler):
__metaclass__ = ProfileMeta
class MainHandler(BaseHandler):
def get(self):
pass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tprofile-0.0.16.tar.gz
(2.7 kB
view details)
Built Distribution
tprofile-0.0.16-py2.7.egg
(7.5 kB
view details)
File details
Details for the file tprofile-0.0.16.tar.gz
.
File metadata
- Download URL: tprofile-0.0.16.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052c326c078e3f555a0a9269eb3d1b39393505fbe67bf4fc44b24bf1ddd24185 |
|
MD5 | e679769b762978421db071fde897c4c1 |
|
BLAKE2b-256 | 291885e5415a3af2f5ffcc2079233e0c616bf4b95c81e2ac56eb00b131cf2c5a |
File details
Details for the file tprofile-0.0.16-py2.7.egg
.
File metadata
- Download URL: tprofile-0.0.16-py2.7.egg
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f235b6e4015d3d26b7a94a402dcdd63ec5b1a0f32ef379a991e90d4965c40ec3 |
|
MD5 | 17fa11930519ef40aabff7029d8e9c5c |
|
BLAKE2b-256 | d22f7bb9245cfc58c09a46d1d0533ce3661dbdfd1ae0e694311fb0eae0ab0964 |