Skip to main content

A XML, JSON,... decode library

Project description

PyDecoder

Documentation Status Updates https://coveralls.io/repos/github/iodevs/pydecoder/badge.svg?branch=master

A XML, JSON,… decode library

Features

  • Decode and validate values from XML and JSON.

Install

To install PyDecoder, run this command in your terminal:

$ pip install pydecoder

Example

>>> 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])

Credits

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

History

0.1.0 (2017-05-21)

  • First release on PyPI.

Project details


Release history Release notifications

This version
History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pydecoder-1.0.3-py2.py3-none-any.whl (8.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Oct 11, 2017
pydecoder-1.0.3.tar.gz (17.8 kB) Copy SHA256 hash SHA256 Source None Oct 11, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page