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 does not depend on specific contexts (e.g. web development) so you can also use it in every Python application.

Changelog

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.3.1.tar.gz (85.2 kB view details)

Uploaded Source

Built Distribution

pycerberus-0.3.1-py2.6.egg (31.3 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pycerberus-0.3.1.tar.gz
Algorithm Hash digest
SHA256 e111703d71dd7a91354bf850e1c6631c8013f8295d2961e939d617a629743df8
MD5 d0b4c822b27e5adb86024425c3183335
BLAKE2b-256 e47ad66897748a784f8737d4f9cd15b3940a18daf0350877048f56b179c8546c

See more details on using hashes here.

File details

Details for the file pycerberus-0.3.1-py2.6.egg.

File metadata

File hashes

Hashes for pycerberus-0.3.1-py2.6.egg
Algorithm Hash digest
SHA256 aa917f6c683e5c545ba89071bcf23d02bf6581f75711d807daac4bc579420908
MD5 8d9c031a5f9ad02736f8600955de8cb6
BLAKE2b-256 3a7a2231fba1395dbb7114399f8b9ad9986de8f9fc195aa28b8eb27f280c1cb6

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