Metadata-Version: 2.1
Name: cawdrey
Version: 0.1.4
Summary: Several useful custom dictionaries
Home-page: https://github.com/domdfcoding/cawdrey
Author: Dominic Davis-Foster
Author-email: dominic@davis-foster.co.uk
License: GNU Lesser General Public License v3 or later (LGPLv3+)
Project-URL: Documentation, https://cawdrey.readthedocs.io
Project-URL: Issue Tracker, https://github.com/domdfcoding/cawdrey/issues
Project-URL: Source Code, https://github.com/domdfcoding/cawdrey
Keywords: ordereddict frozenordereddict orderedfrozendict ordered frozen immutable frozendict dict dictionary map Mapping MappingProxyType developers
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Requires-Dist: domdf-python-tools (>=0.2.3)
Provides-Extra: all

==========
Cawdrey
==========

.. start shields 

.. list-table::
	:stub-columns: 1
	:widths: 10 90

	* - Docs
	  - |docs|
	* - Tests
	  - |travis| |requires| |coveralls| |codefactor|
	* - PyPI
	  - |pypi-version| |supported-versions| |supported-implementations| |wheel|
	* - Anaconda
	  - |conda-version| |conda-platform|
	* - Other
	  - |license| |language| |commits-since| |commits-latest| |maintained| 

.. |docs| image:: https://readthedocs.org/projects/cawdrey/badge/?version=latest
	:target: https://cawdrey.readthedocs.io/en/latest/?badge=latest
	:alt: Documentation Status

.. |travis| image:: https://img.shields.io/travis/domdfcoding/cawdrey/master?logo=travis
	:target: https://travis-ci.org/domdfcoding/cawdrey
	:alt: Travis Build Status

.. |requires| image:: https://requires.io/github/domdfcoding/cawdrey/requirements.svg?branch=master
	:target: https://requires.io/github/domdfcoding/cawdrey/requirements/?branch=master
	:alt: Requirements Status

.. |coveralls| image:: https://coveralls.io/repos/github/domdfcoding/cawdrey/badge.svg?branch=master
	:target: https://coveralls.io/github/domdfcoding/cawdrey?branch=master
	:alt: Coverage

.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/domdfcoding/cawdrey
	:target: https://www.codefactor.io/repository/github/domdfcoding/cawdrey
	:alt: CodeFactor Grade

.. |pypi-version| image:: https://img.shields.io/pypi/v/cawdrey.svg
	:target: https://pypi.org/project/cawdrey/
	:alt: PyPI - Package Version

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/cawdrey.svg
	:target: https://pypi.org/project/cawdrey/
	:alt: PyPI - Supported Python Versions

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/cawdrey
	:target: https://pypi.org/project/cawdrey/
	:alt: PyPI - Supported Implementations

.. |wheel| image:: https://img.shields.io/pypi/wheel/cawdrey
	:target: https://pypi.org/project/cawdrey/
	:alt: PyPI - Wheel

.. |conda-version| image:: https://img.shields.io/conda/v/domdfcoding/cawdrey
	:alt: Conda - Package Version
	:target: https://anaconda.org/domdfcoding/cawdrey

.. |conda-platform| image:: https://img.shields.io/conda/pn/domdfcoding/cawdrey?label=conda%7Cplatform
	:alt: Conda - Platform
	:target: https://anaconda.org/domdfcoding/cawdrey

.. |license| image:: https://img.shields.io/github/license/domdfcoding/cawdrey
	:alt: License
	:target: https://github.com/domdfcoding/cawdrey/blob/master/LICENSE

.. |language| image:: https://img.shields.io/github/languages/top/domdfcoding/cawdrey
	:alt: GitHub top language

.. |commits-since| image:: https://img.shields.io/github/commits-since/domdfcoding/cawdrey/v0.1.4
	:target: https://github.com/domdfcoding/cawdrey/pulse
	:alt: GitHub commits since tagged version

.. |commits-latest| image:: https://img.shields.io/github/last-commit/domdfcoding/cawdrey
	:target: https://github.com/domdfcoding/cawdrey/commit/master
	:alt: GitHub last commit

.. |maintained| image:: https://img.shields.io/maintenance/yes/2020
	:alt: Maintenance

.. end shields

A collection of useful custom dictionaries for Python.

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:

.. code-block:: python

    {'foo.bar': 'val'}

to this:

.. code-block:: python

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

check out `unflatten`_, `flattery`_ or `morph`_  to accomplish that.

.. _unflatten: https://github.com/dairiki/unflatten
.. _morph: https://github.com/metagriffin/morph
.. _flattery: https://github.com/acg/python-flattery


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

.. _indexed: https://github.com/niklasf/indexed.py

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**.

.. _python-benedict: https://github.com/fabiocaccamo/python-benedict




And Finally:
==============

`Why Cawdrey? <https://en.wikipedia.org/wiki/Robert_Cawdrey>`_



