Skip to main content

No project description provided

Project description

pymultimap

PyPI - Version PyPI - Python Version


Table of Contents

MultiMap

Python based Dictionary with support for duplicate keys and sorted data based on keys

Installation

pip install pymultimap

Usage

from pymultimap.multimap import MultiMap

mm = MultiMap()
mm["a"] = 1
mm["a"] = 2
mm["b"] = 3

print(mm)

Should print :
{a: [1, 2], b: [3]}
from pymultimap.multimap import MultiMap

sorted_multimap = MultiMap(sorted=True, reverse=True)
sorted_multimap["a"] = 1
sorted_multimap["c"] = 3
sorted_multimap["b"] = 2

print(sorted_multimap)

Should print :
{c: [3], b: [2], a: [1]}

License

pymultimap is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymultimap-0.0.5.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

pymultimap-0.0.5-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page