Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A XML, JSON,... decode library

Project description

PyDecoder Documentation Status Updates

A XML, JSON,… decode library


  • Decode and validate values from XML and JSON.


To install PyDecoder, run this command in your terminal:

$ pip install pydecoder


>>> from pydecoder.fields import required, optional
>>> from pydecoder.json import to_int, to_string, decode

# Define data
>>> data = {'foo': 'Text', 'bar': 1}

# Describe data
>>> decoders = [
...     required('foo', to_string),
...     required('bar', to_int),
...     optional('baz', to_int, -5),
... ]

# Decode/verify data
>>> decode(lambda x: x, decoders, data)
Result(status='Ok', value=['Text', 1, -5])


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.1.0 (2017-05-21)

  • First release on PyPI.

Project details

Download files

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

Files for pydecoder, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size pydecoder-1.0.3-py2.py3-none-any.whl (8.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pydecoder-1.0.3.tar.gz (17.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page