Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Python module for interacting with nested dicts as a single level dict with delimited keys.

Project description

Version Build 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:

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

would be the same as:

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

values can be accessed as:


# or


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

For example:

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

will be the same as:

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


Documentation is available at


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.


$ pip install flatdict

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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flatdict, version 4.0.1
Filename, size File type Python version Upload date Hashes
Filename, size flatdict-4.0.1.tar.gz (8.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page