Skip to main content

Chibi donkey

small lib for inflate and compress dict using double underscore or proccess string using the format double undescore

how to used with dict

import chibi_donkey as donkey

example = {
        'a': {
                'aa': {
                        'aaa': 'aaa',
                        'aab': 'aab',
                        'aac': 'aac'
                },
                'ab': 'ab',
                'ac': None,
                },
                'b': {
                'ba': [ 1, 2, 3 ],
                'bb': 'bb',
                'bc': None,
                }
}

example_compress= {
        'a__aa__aaa': 'aaa',
        'a__aa__aab': 'aab',
        'a__aa__aac': 'aac',
        'a__ab': 'ab',
        'a__ac': None,
        'b__ba': [ 1, 2, 3 ],
        'b__bb': 'bb',
        'b__bc': None,
}

assert donkey.compress( example ) == example_compress
assert donkey.inflate( example_compress ) == example

assert donkey.get( 'a__aa__aaa', example ) == 'aaa'
assert donkey.get( 'a__ba', example ) == [ 1, 2, 3 ]

donkey.setter( 'a__aa__aaa', example, 'asdf' )
assert donkey.get( 'a__aa__aaa', example ) == 'asdf'

how to use with strings

import chibi_donkey as donkey

assert donkey.init( 'a__b__c' ) == 'a'
assert donkey.last( 'a__b__c' ) == 'c'

assert donkey.key( 'a', 'b', 'c' ) == 'a__b__c'
assert donkey.partition( 'a__b__c' ) == [ 'a', 'b', 'c' ]

Metadata

Release files for chibi-donkey 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chibi-donkey 1.0.2
File Size Uploaded Provenance
chibi_donkey-1.0.2.tar.gz 3.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chibi-donkey 1.0.2
File Interpreter ABI Platform
chibi_donkey-1.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 7.8 kB

Release files / chibi_donkey-1.0.2.tar.gz

Download URL chibi_donkey-1.0.2.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
39b5c196480119e05432ccfa500225d26ebd910db1725d0b7d9ffd0870142f09
BLAKE2b-256 checksum
How to use checksums
8a1bbc2ee32c4680b05054444c75162525058e522ec1c6df7c4f8eaaa5d025e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.11.1 requests/2.32.3 setuptools/69.0.3 requests-toolbelt/1.0.0 tqdm/4.66.5 CPython/3.12.4

Release files / chibi_donkey-1.0.2-py2.py3-none-any.whl

Download URL chibi_donkey-1.0.2-py2.py3-none-any.whl
Size 4.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b714d75ecfb55c3eea20f8cf28ef7ba18fdcc87585552415462eb05400de0448
BLAKE2b-256 checksum
How to use checksums
849ad1c97d887fbfda3556730541dff0853cb2cb142c42cf673b8b351f26a6bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.11.1 requests/2.32.3 setuptools/69.0.3 requests-toolbelt/1.0.0 tqdm/4.66.5 CPython/3.12.4

Security for chibi-donkey 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page