Skip to main content

Highly flexible, no magic input validation library

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.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

Project details


Download files

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

Source Distribution

pycerberus-0.4.1.tar.gz (112.8 kB view details)

Uploaded Source

Built Distributions

pycerberus-0.4.1-py3.1.egg (64.5 kB view details)

Uploaded Source

pycerberus-0.4.1-py2.7.egg (63.9 kB view details)

Uploaded Source

File details

Details for the file pycerberus-0.4.1.tar.gz.

File metadata

  • Download URL: pycerberus-0.4.1.tar.gz
  • Upload date:
  • Size: 112.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pycerberus-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1fb729bd323f072d6eecc6f7210d3821abb2f5a22a7edc143f2d30ee916d4dd7
MD5 62bde5c31bc9e55f72f00e3b49355b77
BLAKE2b-256 4f6667f8957c04fe7d12f7e16f35bde62ac0ce221312706b5407ec895db1ef4a

See more details on using hashes here.

File details

Details for the file pycerberus-0.4.1-py3.1.egg.

File metadata

File hashes

Hashes for pycerberus-0.4.1-py3.1.egg
Algorithm Hash digest
SHA256 1d310131df3ca08e50164fec93a45fb4163fb5fb3739e775d0c01fd820d1c094
MD5 5fd50a5bfa26c0f827e71bb43802d40a
BLAKE2b-256 aa4a791f9fbba94c92e28ed6cdad69df03152f9f7c8643bd6cd1a10d46c0fbc9

See more details on using hashes here.

File details

Details for the file pycerberus-0.4.1-py2.7.egg.

File metadata

File hashes

Hashes for pycerberus-0.4.1-py2.7.egg
Algorithm Hash digest
SHA256 27f2117120a9d6e48acbc454b041db5ed7fc08b4c92d544b786a961ffe3c9a47
MD5 dc7dc6f8c204d846a0e32e8e13220b0a
BLAKE2b-256 22a9ff402137c613577a7058b1b9a1cb6ea7f4f0cb4266b0b97fe091fb50a5a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page