Skip to content

fsssosei/MultivaluedDict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultivaluedDict

PyPI PyPI - Status GitHub Release Date Build Status Code Intelligence Status Language grade: Python Codacy Badge Scrutinizer Code Quality PyPI - Downloads PyPI - Python Version PyPI - License

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()