Multivalued dictionary package in python.
Project description
MultivaluedDict
Multivalued dictionary package in python.
This package features a high degree of consistency with the dict native type use case, including the type of exception that occurs.On this basis, some special multi-value dictionary methods are added.
Installation
Installation can be done through pip. You must have python version >= 3.7
pip install multivalued_dict
Usage
The statement to import the package:
from multivalued_dict_package import *
Example:
>>> mv_d = multivalued_dict()
>>> mv_d
multivalued_dict({})
>>> mv_d = multivalued_dict({'a': ['test-1', 'test-2', 'test-3'], 'b': 'test-4'})
>>> mv_d
multivalued_dict({'a': ['test-1', 'test-2', 'test-3'], 'b': ['test-4']})
>>> mv_d = multivalued_dict([['a', 'test-1'], ['b', 'test-2'], ['a', 'test-3']])
>>> mv_d
multivalued_dict({'a': ['test-1', 'test-3'], 'b': ['test-2']})
Statements for automated testing of modules:
import multivalued_dict_package.doctestmod_module as mvdt
mvdt.doctestmod()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multivalued_dict-1.7.5.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for multivalued_dict-1.7.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d36c8150cf69a5a9d2d5b95f38814cd77cc62fc16543e541b19771b9db3d4ad |
|
MD5 | fd4f06e86d8d0784c8691bc3be1ca24a |
|
BLAKE2b-256 | b005643a5a1c64b223abc581c8ab49ae878ce2c46ac800e8bc6b23265cb38d56 |