Skip to main content

Accordion

Build Status Coverage Status PyPI version

About

Make flat dict and back from dict

Installation

With pip:

pip install accordion

Example

from accordion import compress, expand

data = {
    "a": [1, 2, 3],
    "b": {
        "c": "d"
    }
}

expected = {
    "a/0": 1,
    "a/1": 2,
    "a/2": 3,
    "b.c": "d"
}

assert compress(data) == expected
assert expand(compress(data)) == data

Requirements

Tested with python3.6

Contribution how-to

Run tests:
  • clone repo: git clone <your-fork>
  • create and activate your virtualenv
  • pip install -r requirements.txt && pip install -r dev-requirements
  • ./run_tests.sh

Download files

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

Source Distribution

accordion-0.2.3.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file accordion-0.2.3.tar.gz.

File metadata

  • Download URL: accordion-0.2.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.7.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for accordion-0.2.3.tar.gz
Algorithm Hash digest
SHA256 560ce51857f326e631a2ff8986cdab689ef4dfd020ba3bd76c9a0f02b3fc7d6e
MD5 d192b054cda0f6aeb65c3372b9a08c1a
BLAKE2b-256 71a08ccf03031a9a1b7e745919e7fd4f8dc0e8e5fec6f8a66054dac356106798

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page