Skip to main content

Convert many serialization formats to many formats

Project description

https://img.shields.io/pypi/v/roundhouse.svg https://img.shields.io/travis/nick-allen/python-roundhouse.svg Documentation Status

Convert many serialization formats to many formats


Installation

Install CLI bundled with base package

Comes with just JSON and Pickle serializers by default, no external dependencies

pip install roundhouse

Install one or more additional serializers and their dependencies

pip install roundhouse[yaml] roundhouse[msgpack] ...

Or install all builtin serializers and dependencies bundled with core package

pip install roundhouse[all]

Additional serializer plugins can be published and installed via pypi/pip using the roundhouse setuptools entrypoint pointing to module/package containing additional serializer classes

Usage

CLI

The rh CLI command is installed automatically, and defaults to reading from stdin and writing stdout

Run rh --help for full usage instructions

echo '{"root": {"nested": {"key": "value"}}}' | rh -i json -o xml

<?xml version="1.0" encoding="utf-8"?>
<root><nested><key>value</key></nested></root>

Python

Data is serialized/deserialized to and from dict instances

Other data types may be supported depending on the serializer

Use the roundhouse.serialize and roundhouse.deserialize functions with target format

from roundhouse import serialize, deserialize

data = deserialize('{"root": {"nested": {"key": "value"}}}', 'json')
print(serialize(data, 'xml'))

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

roundhouse-0.2.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

roundhouse-0.2.1-py2.py3-none-any.whl (11.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file roundhouse-0.2.1.tar.gz.

File metadata

  • Download URL: roundhouse-0.2.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for roundhouse-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2669b446edfa7052a0e67c0cbb8137e05a7367166af7084c721ab466e8117fcd
MD5 e3c2c10822755752b5f36aee1a7d3008
BLAKE2b-256 ff6fc369d4edb0af121570934c1f1d79f96d82c85464e9fd7d03a275f1c503fa

See more details on using hashes here.

File details

Details for the file roundhouse-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for roundhouse-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b583b3c7cc83fa39694444537272911caec06dc18d68ddaeca213546b7e4bd35
MD5 faa72009d160cee8d75d620d9e8231a4
BLAKE2b-256 21d9f61882efef9c773552de8f3211936adaaec4d1dc47920c2060ca3a696f78

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