Skip to main content

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 pre-commit.ci 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 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/conda-forge
$ conda config --add channels http://conda.anaconda.org/domdfcoding
  • Then install

$ conda install cawdrey

And Finally:

Why “Cawdrey”?

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.4.2.tar.gz (19.1 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.4.2-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cawdrey-0.4.2.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for cawdrey-0.4.2.tar.gz
Algorithm Hash digest
SHA256 292f607d061cab18eff61cffa0354a9da40aeb54f0605712534a6ecdf8dc4e0f
MD5 fcf830ba17f8781c44e4957217d0290e
BLAKE2b-256 c3a21194b5c40a89a711c200e13541a67e20b8b486f2c4da8cd230bc27b60549

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cawdrey-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for cawdrey-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4aec198893f6111809fcf1f586ef9c94356be5677749884f44d4fc4227c454a3
MD5 b3cdf45adf628fb359eb3fd96485432c
BLAKE2b-256 bf35b48a0d8fa25a91f02f2e8470112889fec8c9d37f5e5cc164c2d04e6a1e24

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

0.5.0

2 files

This release

0.4.2 This release

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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