All Projects → gmr → Flatdict

gmr / Flatdict

Licence: bsd-3-clause
Python module for interacting with nested dicts as a single level dict with delimited keys.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Flatdict

Etcd
Development repository for the etcd cookbook
Stars: ✭ 71 (-2.74%)
Mutual labels:  hacktoberfest
Edxposedmanager
Companion Android application for EdXposed
Stars: ✭ 1,172 (+1505.48%)
Mutual labels:  hacktoberfest
Emayili
An R package for sending email messages.
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Interview Prep
Everything you need to know to get the job
Stars: ✭ 69 (-5.48%)
Mutual labels:  hacktoberfest
Opentogethertube
Watch videos with your friends. The spiritual successor to TogetherTube, preserving the spirit of it's simple to use interface, while improving it's look, feel, and reliability.
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Church Calendar Api
API providing Roman Catholic church calendar data for your apps
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Laravel Disqus
A simple Disqus platform integration with Laravel.
Stars: ✭ 71 (-2.74%)
Mutual labels:  hacktoberfest
Puppet Gitlab
Puppet module to manage Gitlab (Omnibus)
Stars: ✭ 73 (+0%)
Mutual labels:  hacktoberfest
Moviedb Promise
Interact with themoviedb.org's api with Node... now in TypeScript!
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Dotenv Java
🗝️ Dotenv is a no-dep, pure Java module that loads environment variables from a .env file
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Dockerkit
Control your Docker Containers with HomeKit
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Country Coder
📍➡️ 🇩🇰 Convert longitude-latitude pairs to ISO 3166-1 codes quickly and locally
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Tsuru Client
tsuru-client is a tsuru command line tool for application developers.
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Hacktoberfest2020
Contribute for hacktoberfest 2020
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest
Hacktoberfest Swag List
Multiple companies give out swag for Hacktoberfest, and this repo tries to list them all.
Stars: ✭ 1,184 (+1521.92%)
Mutual labels:  hacktoberfest
Made In India
🇮🇳 A list of neat projects made in India.
Stars: ✭ 70 (-4.11%)
Mutual labels:  hacktoberfest
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+1516.44%)
Mutual labels:  hacktoberfest
Choco Wiki
The content from this repository has been moved to https://github.com/chocolatey/docs. If you have found an issue, or want to submit a fix, then please open an issue, or a PR, on that repository.
Stars: ✭ 73 (+0%)
Mutual labels:  hacktoberfest
Gr Nrsc5
A GNU Radio implementation of HD Radio (NRSC-5)
Stars: ✭ 73 (+0%)
Mutual labels:  hacktoberfest
Pagination
Paginate record sets, not tied in directly to a database.
Stars: ✭ 72 (-1.37%)
Mutual labels:  hacktoberfest

FlatDict

|Version| |Status| |Coverage| |License|

FlatDict and FlatterDict are a dict classes that allows for single level, delimited key/value pair mapping of nested dictionaries. You can interact with FlatDict and FlatterDict like a normal dictionary and access child dictionaries as you normally would or with the composite key.

For example:

.. code-block:: python

value = flatdict.FlatDict({'foo': {'bar': 'baz', 'qux': 'corge'}})

would be the same as:

.. code-block:: python

value == {'foo:bar': 'baz', 'foo:qux': 'corge'}

values can be accessed as:

.. code-block:: python

print(foo['foo:bar'])

# or

print(foo['foo']['bar'])

Additionally, lists and tuples are also converted into dicts using enumerate(), using the FlatterDict class.

For example:

.. code-block:: python

value = flatdict.FlatterDict({'list': ['a', 'b', 'c']})

will be the same as:

.. code-block:: python

value == {'list:0': 'a', 'list:1': 'b', 'list:2': 'c'}

API

Documentation is available at https://flatdict.readthedocs.io

Versioning

This package attempts to use semantic versioning. API changes are indicated by the major version, non-breaking improvements by the minor, and bug fixes in the revision.

It is recommended that you pin your targets to greater or equal to the current version and less than the next major version.

Installation

.. code-block:: bash

$ pip install flatdict

Note that as of 4.0, setuptools 39.2 or higher is required for installation.

.. |Version| image:: https://img.shields.io/pypi/v/flatdict.svg? :target: https://pypi.python.org/pypi/flatdict

.. |Status| image:: https://github.com/gmr/flatdict/workflows/Testing/badge.svg :target: https://github.com/gmr/flatdict/actions :alt: Build Status

.. |Coverage| image:: https://img.shields.io/codecov/c/github/gmr/flatdict.svg? :target: https://codecov.io/github/gmr/flatdict?branch=master

.. |License| image:: https://img.shields.io/pypi/l/flatdict.svg? :target: https://flatdict.readthedocs.org

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].