Python Slice Map
Slicemap is a MIT licensed library introducing a useful, dictionary-like data structure, similar to normal Python dict, but instead of setting values key by key, you set entire slices.
Features:
- Implemented entirely in Python
- Has only one dependency: sortedcontainers
- Is efficient, it has
O(log(n))time complexity for insertion and query- Adding new slices might make old ones become redundant
ncorrespondes to the maximal number of slices present in SliceMap at a time
- Makes life easier, see applications
Example
from slicemap import SliceMap
sm = SliceMap()
sm[-3:3] = 0.1
sm[6.5:] = "Hello, SliceMap"
print(sm[0])
print(sm[10])
0.1
'Hello, SliceMap'
See more examples in Quick Start.
Installation
Install easily with pip:
pip install slicemap
Links
Metadata
Release files for slicemap 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slicemap-1.2.2.tar.gz | 42.2 kB | Without provenance | Details for slicemap-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slicemap-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for slicemap-1.2.2-py3-none-any.whl |
Total release size: 49.0 kB
Release files / slicemap-1.2.2.tar.gz
| Download URL | slicemap-1.2.2.tar.gz |
|---|---|
| Size | 42.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e64fe286982b86534afd704666362ae2c0ac92266ab4defaaf48375a96b84183
|
|
BLAKE2b-256 checksum How to use checksums |
ced9d078433994a8814c1b140bccc5a6c65a6ae73f7a9af059b3466ed18638ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Release files / slicemap-1.2.2-py3-none-any.whl
| Download URL | slicemap-1.2.2-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06d01d850315d6aa7226155374e9c7d5e0ba0a465b48c4b648ef033e2ec223a7
|
|
BLAKE2b-256 checksum How to use checksums |
ca0f9dc7f3101ac1f0178ce257f7665cdab48fefc3f8c0b473c9fc57c080e3aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Security for slicemap 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.