Accordion
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
Metadata
Release files for accordion 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| accordion-0.2.3.tar.gz | 3.7 kB | Details |
Release files / accordion-0.2.3.tar.gz
| Download URL | accordion-0.2.3.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
560ce51857f326e631a2ff8986cdab689ef4dfd020ba3bd76c9a0f02b3fc7d6e
|
|
BLAKE2b-256 checksum How to use checksums |
71a08ccf03031a9a1b7e745919e7fd4f8dc0e8e5fec6f8a66054dac356106798
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|