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

Linux Test Status Windows Test Status macOS Test Status Coverage

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 PyPI - Downloads

QA

CodeFactor Grade Flake8 Status mypy status

Other

License GitHub top language Requirements Status

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 OrderedDict 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 https://conda.anaconda.org/conda-forge
$ conda config --add channels https://conda.anaconda.org/domdfcoding
  • 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.5.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

cawdrey-0.5.1-py3-none-any.whl (61.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cawdrey-0.5.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for cawdrey-0.5.1.tar.gz
Algorithm Hash digest
SHA256 1878ce4ea83328c7567caaf244d2bfac78aa85e78ce04113451a43ae474dbe8e
MD5 902c20ba80c5140cf7970b28cc1b0949
BLAKE2b-256 1b3c5001f8120570f469a795414c51155677c0c75c6112932e70a96b8cad49cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cawdrey-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 61.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for cawdrey-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd1406e80b84cd851d95d3f857685c2e76f7f0429154f18dff264998743d5456
MD5 14908298115f0f19194a448db41e8920
BLAKE2b-256 69b2ed71fe821087d9eb1ed7aac99677fa544b10b83ae395994e908140d06ab3

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