Skip to main content

FlatDict

Version Status Coverage License

FlatDict and FlatterDict are dict classes that allow 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:

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:

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

will be the same as:

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

pip install flatdict

Release files for flatdict 4.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flatdict 4.1.0
File Size Uploaded
flatdict-4.1.0.tar.gz 33.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flatdict 4.1.0
File Interpreter ABI Platform
flatdict-4.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.2 kB

Release files / flatdict-4.1.0.tar.gz

Download URL flatdict-4.1.0.tar.gz
Size 33.9 kB
Tags Source
SHA-256 checksum
How to use checksums
63bcd906a0859d91d0aace44b327178706c7fcf85a88c7ccf0825628376ad66b
BLAKE2b-256 checksum
How to use checksums
1fbae0461697020839f60741e493fc42b20a4cd3f91594ed3228f65ae9a50aee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 15, 2026.

Transparency log

Release files / flatdict-4.1.0-py3-none-any.whl

Download URL flatdict-4.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24c3ff816733e472f91071031bd286c3826ecf2d646d5020af49fe10b20a5677
BLAKE2b-256 checksum
How to use checksums
12b56b6c496304047982b67d984ed2f77c183f73d69f7dbbc0cd2928252cc6b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.1.0 This release

2 release files

4.0.1

1 release file

4.0.0

1 release file

3.4.0

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

1 release file

2.0.1

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

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