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.2

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.2
File Size Uploaded Provenance Actions
multi_key_dict-1.0.2.zip 7.8 kB Without provenance Details for multi_key_dict-1.0.2.zip
multi_key_dict-1.0.2.tar.gz 6.4 kB Without provenance Details for multi_key_dict-1.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 218.6 kB

Release files / multi_key_dict-1.0.2.zip

Download URL multi_key_dict-1.0.2.zip
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b8982aef7a8253426d041c71f36875bc12a19697405214867027b1041adec726
BLAKE2b-256 checksum
How to use checksums
fc9a2e3572ec6b33ffd746adce694514f392b2c849f07c5a11f4f675889b9ea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / multi_key_dict-1.0.2.tar.gz

Download URL multi_key_dict-1.0.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9936b32a393704f1e95994ffcf4bb81cfebcf5a84c88a7f8779904fff87a0d4c
BLAKE2b-256 checksum
How to use checksums
569b16f3c2eb760fa8ecbe7d0d5327b832e6f8a23153f8992a8e8d14189199cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / multi_key_dict-1.0.2.win32.exe

Download URL multi_key_dict-1.0.2.win32.exe
Size 204.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7c26ea5f237e9299af4cafbb1eedfdf90fa3a5563cd0613ccb0ce27867eb20b4
BLAKE2b-256 checksum
How to use checksums
71b53441d5d8c608108e7d4670cd188fb7573e01f723840ecfd8a0a81a8f535b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for multi-key-dict 1.0.2

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