Skip to main content

tornado filtration

Project description

Pyfiltration tornado filtration

You can install Pyfiltration from PyPI with

$ pip install pyfiltration

Version update

  • 1.0.6 Bug Year 2000 (Y2K) issues: Values 100–1899 are always illegal
  • 1.0.4 raise Exception
  • 1.0.1 initialize project


#!/usr/bin/env python
# coding=utf-8

import tornado.web.RequestHandler
from pyfiltration import Item, Helper, filtration

class RegisterHandler(tornado.web.RequestHandler):

    def get_validation_args(self):
        return {
            "post": [
                Item("password", str, validates=[
                        lambda k: k and len(k) >= 6 and len(k) <= 16, None, {"password": u"请输入6-16位密码,字母区分大小写,包含字母和数字"}),
                        {"exists": [Helper.STRING_HAS_NUMBER, Helper.STRING_HAS_LETTER]},
                        {"password": u"请输入6-16位密码,字母区分大小写,包含字母和数字"}

    def post(self, fparams=None):


  • Helper.is_valid_email_address(email)
  • Helper.is_valid_string(val, exists=None)
  • Helper.is_included(val, vals=None)
  • Helper.is_valid_random_token(val, length=32)
  • Helper.is_valid_telephone(val)
  • Helper.is_valid_datetime(val, formats=None)
  • Helper.is_excluded_special_char(val)
  • Helper.is_valid_password(val, min_length=6, max_length=16)
  • Helper.is_valid_url(val, domains=None)
  • Helper.is_valid_base64_string(val)
  • Helper.get_value(val, vals=None)
  • Helper.get_timestamp_from_timestr(val, formats):


If you need help using pyfiltration or have found a bug, please open a github issue.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pyfiltration-1.0.9-py2.7.egg (9.9 kB) Copy SHA256 hash SHA256 Egg 2.7
pyfiltration-1.0.9.tar.gz (4.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page