Skip to main content

multi_key_dict

Implementation of a multi-key dictionary, i.e.:

(key1[,key2, ..]) => value

This dictionary has a similar interface to the standard dictionary => but is extended to support multiple keys referring to the same element.

If element is created using multiple keys, e.g.:

from multi_key_dict import multi_key_dict

k = multi_key_dict()
k[1000, 'kilo', 'k'] = 'kilo (x1000)'

print k[1000] # will print 'kilo (x1000)'
print k['k'] # will also print 'kilo (x1000)'

# the same way objects can be updated, deleted:
# and if an object is updated using one key, the new value will
# be accessible using any other key, e.g. for example above:
k['kilo'] = 'kilo'
print k[1000] # will now print 'kilo' as value was updated

These elements can be accessed using either of those keys (e.g for read/update/deletion).

Multi-key dict provides also extended interface for iterating over items and keys (e.g. by the key type), which might be useful when creating, e.g. dictionaries with index-name key pair allowing to iterate over items using either: names or indexes. It can be useful for many many other similar use-cases, and there is no limit to the number of keys used to map to the value.

There are few other useful methods, e.g. to iterate over dictionary (by/using) selected key type, finding other keys mapping to the same value etc. Refer to example/test code to see it in action.

Metadata

Release files for multi-key-dict 1.0.7

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

Source distributions (sdists)

Source distribution for multi-key-dict 1.0.7
File Size Uploaded Provenance Actions
multi_key_dict-1.0.7.zip 9.2 kB Without provenance Details for multi_key_dict-1.0.7.zip
multi_key_dict-1.0.7.tar.gz 7.6 kB Without provenance Details for multi_key_dict-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multi-key-dict 1.0.7
File Interpreter ABI Platform Actions
multi_key_dict-1.0.7.win32.exe Details for multi_key_dict-1.0.7.win32.exe

Total release size: 222.8 kB

Release files / multi_key_dict-1.0.7.zip

Download URL multi_key_dict-1.0.7.zip
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0f8d4c886621aa31b79478f95795624862d4eba98ff2c54908bdaaf43625bff7
BLAKE2b-256 checksum
How to use checksums
62a321b33d2a51195ca8f524cada49d3d2b666de86c29bf5e9d34c0e1a894c30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / multi_key_dict-1.0.7.tar.gz

Download URL multi_key_dict-1.0.7.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0ff48dc217852db59e22ad178e1ee5343a0a6fbdf9f232172f59cf2d2b63c4c6
BLAKE2b-256 checksum
How to use checksums
7bae2cddfaa849187032e38dc3d4db88fd2b862b2f9893b8a5cb9ccd5c99884f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / multi_key_dict-1.0.7.win32.exe

Download URL multi_key_dict-1.0.7.win32.exe
Size 206.0 kB
Tags Source
SHA-256 checksum
How to use checksums
de89bf4de63f302da25dec8ce7811923330ca817e395feb8db5a8c4c5a0863ed
BLAKE2b-256 checksum
How to use checksums
ebd01262fb97e0c858b1c0cce75637867817587bb75270ae96c586fbf99870a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for multi-key-dict 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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