Skip to content
This is a multi-value dictionary Python package
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
setup.py

README.md

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

本包特点是跟dict原生类型用例高度一致,包括发生异常的类型。在此基础上增添了一些专门的多值字典方法。

欢迎补全文档。

Multivalued dictionary package in python.

Welcome to complete the documentation.

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()
You can’t perform that action at this time.