Git Product home page Git Product logo

domdfcoding / cawdrey Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 443 KB

Several useful custom dictionaries for Python ๐Ÿ“–โ€‚๐Ÿ

Home Page: https://cawdrey.readthedocs.io/en/latest

License: GNU Lesser General Public License v3.0

Python 99.02% HTML 0.31% CSS 0.15% Just 0.52%
python3 dictionary frozendict dict frozen frozenordereddict immutable map mapping mappingproxytype orderedfrozendict python counter

cawdrey's Introduction

Cawdrey

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 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"?

cawdrey's People

Contributors

domdfcoding avatar pre-commit-ci[bot] avatar pushfoo avatar repo-helper[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.