Skip to main content

Several useful custom dictionaries for Python 📖 🐍

Project description

Several useful custom dictionaries for Python 📖 🐍

Docs

Documentation Build Status Docs Check Status

Tests

Travis Build Status Windows Tests Status macOS Tests Status Coverage CodeFactor Grade

PyPI

PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel

Anaconda

Conda - Package Version Conda - Platform

Activity

GitHub last commit GitHub commits since tagged version Maintenance

Other

License GitHub top language Requirements Status pre-commit

Contents

  • frozendict: An immutable dictionary that cannot be changed after creation.

  • FrozenOrderedDict: An immutable OrderedDict where the order of keys is preserved, but that cannot be changed after creation.

  • AlphaDict: A FrozenOrderedDict where the keys are stored in alphabetical order.

  • bdict: A dictionary where key, value pairs are stored both ways round.


This package also provides two base classes for creating your own custom dictionaries:

  • FrozenBase: An Abstract Base Class for Frozen dictionaries.

  • MutableBase: An Abstract Base Class for mutable dictionaries.


Other Dictionary Packages

If you’re looking to unflatten a dictionary, such as to go from this:

{'foo.bar': 'val'}

to this:

{'foo': {'bar': 'val'}}

check out unflatten, flattery or morph to accomplish that.

indexed provides an OrederedDict where the values can be accessed by their index as well as by their keys.

There’s also python-benedict, which provides a custom dictionary with keylist/keypath support, I/O shortcuts (Base64, CSV, JSON, TOML, XML, YAML, pickle, query-string) and many utilities.

Installation

Cawdrey can be installed from PyPI or Anaconda.

To install with pip:

$ python -m pip install cawdrey

To install with conda:

  • First add the required channels

$ conda config --add channels http://conda.anaconda.org/domdfcoding
$ conda config --add channels http://conda.anaconda.org/conda-forge
  • Then install

$ conda install cawdrey

And Finally:

Why “Cawdrey”?

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

cawdrey-0.2.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cawdrey-0.2.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file cawdrey-0.2.0.tar.gz.

File metadata

  • Download URL: cawdrey-0.2.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.10

File hashes

Hashes for cawdrey-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2a1cba9a87792c49ca3390c076526bbfec2e64971b6e11e408fadcdc4e47ab62
MD5 87a200ba6888970434f109969c4a96bd
BLAKE2b-256 a929aa6c122ffd21eda5d163758dabcf24c61a16040b3913cd6718d7f81cc2d6

See more details on using hashes here.

File details

Details for the file cawdrey-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cawdrey-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.10

File hashes

Hashes for cawdrey-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bace075d6eae8fbea4ac296fc43a9b377cfc5bb1fe89f90c8627635f7b6dccb
MD5 ba98bc2e7b6147b6724103c3c1c6fc5e
BLAKE2b-256 e714618dd41491a9f64ddf1d571e2d94e0ce551afe807b511e11df90f37a99e1

See more details on using hashes here.

Supported by

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