Skip to main content
https://coveralls.io/repos/github/futursolo/magicdict/badge.svg https://github.com/futursolo/magicdict/workflows/testing%20%26%20packaging/badge.svg?branch=master&event=push https://img.shields.io/pypi/v/magicdict.svg

An ordered, one-to-many mapping.

Install

$ pip install -U magicdict

Thread Safety

FrozenMagicDict and its subclasses should be thread safe without additional locking. If any data races occurred, then that’s a bug. Please file an issue with reproducing procedure.

Usage

MagicDict should function like collections.OrderedDict except move_to_end is not defined and d[key] always returns the first item.

FrozenMagicDict is an immutable version of MagicDict.

FrozenTolerantMagicDict and TolerantMagicDict are case-insensitive versions of FrozenMagicDict and MagicDict respectively.

get_first, get_last, get_iter, and get_list: These methods are available in FrozenMagicDict and its subclasses. For more details, please read the comments of each method.

add: Method add is available in MagicDict and TolerantMagicDict. This method is used as an substitution of dic[key] = value as it can append a value to the dictionary without removing the existing one. Setting values like normal OrderedDict will clear the stored value(s) if any.

Contributing

The repository is hosted on GitHub.

License

Copyright 2020 Kaede Hoshikawa

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Metadata

Release files for magicdict 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for magicdict 1.0.6
File Size Uploaded
magicdict-1.0.6.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for magicdict 1.0.6
File Interpreter ABI Platform
magicdict-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 34.5 kB

Release files / magicdict-1.0.6.tar.gz

Download URL magicdict-1.0.6.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
75a9e47056a11a3fb6c13e352267a0dfa0707da7089a93af44e10e467a0a0ae6
BLAKE2b-256 checksum
How to use checksums
2a3a6e135eb40fe2ecc277d4533b78e3a5d5a8859a8be495c1dfbb98bba5c0e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / magicdict-1.0.6-py3-none-any.whl

Download URL magicdict-1.0.6-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59705375e5485fc203dc1b79713ca5692088802ff61d9e1879dae75effc2457d
BLAKE2b-256 checksum
How to use checksums
53a0ebf9995f1d74c3698b256fd13516844ed537f86513aecad490d6a791a5ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 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