Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

DEMO

#!/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位密码,字母区分大小写,包含字母和数字"}),
                    (
                        Helper.is_valid_string,
                        {"exists": [Helper.STRING_HAS_NUMBER, Helper.STRING_HAS_LETTER]},
                        {"password": u"请输入6-16位密码,字母区分大小写,包含字母和数字"}
                    )
                ]),
            ]
        }

    @filtration("post")
    def post(self, fparams=None):
        pass

API

  • 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):

Support

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

Release History

Release History

This version
History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyfiltration-1.0.9-py2.7.egg (9.9 kB) Copy SHA256 Checksum SHA256 2.7 Egg Mar 29, 2016
pyfiltration-1.0.9.tar.gz (4.9 kB) Copy SHA256 Checksum SHA256 Source Mar 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting