This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pycerberus is a framework to check user data thoroughly so that you can protect your application from malicious (or just garbled) input data.

  • Remove stupid code which converts input values: After values are validated, you can work with real Python types instead of strings - e.g. 42 instead of ‘42’, convert database IDs to model objects transparently.
  • Implement custom validation rules: Writing custom validators is straightforward, everything is well documented and pycerberus only uses very little Python magic.
  • Focus on your value-adding application code: Save time by implementing every input validation rule only once, but 100% right instead of implementing a dozen different half-baked solutions.
  • Ready for global business: i18n support (based on GNU gettext) is built in, adding custom translations is easy.
  • Tune it for your needs: You can implement custom behavior in your validators, e.g. fetch translations from a database instead of using gettext or define custom translations for built-in validators.
  • Use it wherever you like: pycerberus is used in a SMTP server, trac macros as well as web applications - there are no dependencies on a specific context like web development.

Changelog

0.6 (24.11.2014)

  • stop using 2to3 for Python 3 compatibility and use exactly the same source for all Python versions.
  • drop support for Python 2.4 and 2.5
  • bug fix: detect validator message keys correctly also when messages are specified during validator initialization

0.5 (05.08.2013)

  • ‘allow_additional_parameters’ can now be specified in the schema constructor directly as well as a parameter for a declarative schema
  • new ForEach validator to validate a list of items with the same validator
  • InvalidDataErrors can return a list of errors using ‘.errors()’.
  • added ‘min_length’, ‘max_length’ parameters when instantiating a StringValidator
  • All validator messages can be overridden during instantiation by specifying messages attribute,
  • new OneOf validator to validate that a value is in a given list of allowed values
  • added constructor parameter ‘filter_unvalidated_parameters’ (default True) for SchemaValidators to pass unvalidated parameters instead of removing them
  • InvalidDataErrors can “unpack” their errors so that an ordinary dict is used as container for sub-errors (instead of another InvalidDataError with an error_dict)
  • new BooleanCheckbox validator to validate typical HTML checkboxes
  • new API method for all validators: ‘.copy()’ returns a clone of the validator
  • new MatchingFields form validator (typically used to verify a password confirmation field)
  • new AgreeToConditionsCheckbox validator which works like a BooleanCheckbox but enforces a trueish value
  • EmailAddressValidator accepts also ‘-‘ and ‘+’ characters in local part

API changes:

  • BaseValidator.error() is deprecated now as the name does not really reflect that the method also raised the exception. I added a new method named ‘.raise_error()’ which behaves exactly like the old .error() method. In addition there is a new method ‘.exception()’ which only creates an exception instance.
  • IntegerValidator now treats ” and None as empty
  • BaseValidator.to_string() changed to BaseValidator.revert_conversion() which reflects the actual purpose better. Validators are not required to return a string anymore.

0.4.2 (05.05.2011)

  • More fixes for source distribution because of missing files in tar.gz

0.4.1 (16.04.2011)

  • Fix source distribution (distribution_helpers.py were not included)

0.4 (13.04.2011)

  • pycerberus now supports Python 3!
  • Fix installation/egg generation without babel
  • Added a schema which can parse positional parameters from a string into a dict before processing the data like a normal schema would do

0.3.3 (04.07.2010)

  • Fix installation issue: pycerberus is actually not zip-safe

0.3.2 (05.06.2010)

  • Fix egg file generation: Include all necessary packages in eggs
  • added babel support to setup.py
  • updated pot file and completed German translation
  • fix exception if translations for preferred locale are not available (fall back to english messages)

0.3.1 (07.04.2010)

  • Fixed bug due to duplicated message in DomainNameValidator/EmailAddressValidator
  • Validator can now strip inputs (False by default)
  • StringValidator now also treats ” as empty value (as well as None)

0.3 (27.03.2010)

  • Python 2.3 compatibility
  • Schema can raise error if unknown items are processed
  • Basic domain name validator
  • Basic email address validator

0.2 (16.03.2010)

  • You now can declare custom messages as a class-level dict
  • Added interface to retrieve error details from InvalidDataErrors
  • Added validation schemas to validate a set of values (typically a web form). Schemas can also inherit from other schemas to avoid code duplication.
  • Validators try to make thread-safety violations obvious
  • Nicer API to retrieve error details from an InvalidDataError

0.1 (30.01.2010)

  • initial release
Release History

Release History

0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pycerberus-0.6.tar.gz (152.8 kB) Copy SHA256 Checksum SHA256 Source Nov 24, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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