Last updated:
0 purchases
marbaloo validators 0.1.1
validators library support for cherrypy.
Installation
pip install marbaloo_validators
Usage
# app.py
import cherrypy
import marbaloo_validators
import os
marbaloo_validators.Plugin(cherrypy.engine).subscribe()
cherrypy.tools.validators = marbaloo_validators.Tool()
class Root(object):
@cherrypy.expose
def index(self):
validators = cherrypy.request.validators
if validators.email('[email protected]'):
return 'TRUE'
else:
return 'FALSE'
root_path = os.path.dirname(__file__)
config = {
'/': {
'tools.validators.on': True
}
}
cherrypy.quickstart(Root(), '/', config)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.