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.

Release files for multi_key_dict 2.0.3

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 2.0.3
File Size Uploaded
multi_key_dict-2.0.3.zip 9.9 kB Details
multi_key_dict-2.0.3.tar.gz 8.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for multi_key_dict 2.0.3
File Interpreter ABI Platform
multi_key_dict-2.0.3.win-amd64.exe Details
multi_key_dict-2.0.3.win32.exe Details

Total release size: 371.9 kB

Release files / multi_key_dict-2.0.3.zip

Download URL multi_key_dict-2.0.3.zip
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3a1e1fc705a30a7de1a153ec2992b3ca3655ccd9225d2e427fe6525c8f160d6d
BLAKE2b-256 checksum
How to use checksums
cc53c51c9362de4b25c0bdb854047b17b52ba109e2dbd70043a6d852fe69d900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / multi_key_dict-2.0.3.tar.gz

Download URL multi_key_dict-2.0.3.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
deebdec17aa30a1c432cb3f437e81f8621e1c0542a0c0617a74f71e232e9939e
BLAKE2b-256 checksum
How to use checksums
6d972e9c47ca1bbde6f09cb18feb887d5102e8eacd82fbc397c77b221f27a2ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / multi_key_dict-2.0.3.win-amd64.exe

Download URL multi_key_dict-2.0.3.win-amd64.exe
Size 146.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fb67a532d7361a66820aa1e8fe6c0c939f4c34a3a09a3e8db199ce7b77c4fb78
BLAKE2b-256 checksum
How to use checksums
47a5a2d29af9491979a4f41b0e35f9530e581a6a6b99f6a25a82b7f1afc4570e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / multi_key_dict-2.0.3.win32.exe

Download URL multi_key_dict-2.0.3.win32.exe
Size 206.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cb1e00aa9d8192496cc0cc040f6d9602f35e4cf099e866248be06b04fd45b42b
BLAKE2b-256 checksum
How to use checksums
22185f467aeecf151ed921cb36c5c978b56928945be3c41630a97fb10a0b2614
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.3 This release

4 release files

2.0.2

3 release files

2.0.1

5 release files

2.0

3 release files

1.1.0

3 release files

1.0.10

3 release files

1.0.8

2 release files

1.0.7

3 release files

1.0.6

3 release files

1.0.5

3 release files

1.0.4

3 release files

1.0.3

3 release files

1.0.2

3 release files

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