Skip to main content

Dictionary that support slicing and multiple key selection

Project description

sliceable-dict

A simple dictionary that support slicing and multiple key selection.

Installation and requirements

Slice-dict requires Python 3.7+ to run and can be installed by running

pip install sliceable-dict

Usage

One can use SliceDict identical to dict, but it brings some additional features, like getting and setting multiple keys at once and slicing.

>>> from sliceable_dict import SliceDict
>>> d = SliceDict(zero=0, one=1)
>>> d
{'zero': 0, 'one': 1,}

>>> d[['two', 'three']] = 2, 3
>>> d[1:-1]
{'one': 1, 'two': 2}

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

sliceable_dict-0.0.2.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

sliceable_dict-0.0.2-py3-none-any.whl (17.9 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