Slict
Dictionary that supports slices.
Slict implements Mapping and accepts the [start]:[stop] index to slice tuple-keys along one or more of their dimensions.
Slict can wrap any other Python Mapping and is lightweight (O(1) in space). Try it with a chest, for example.
Example
>>> from slict import Slict
>>> weather = Slict({("12pm", "Temperature"): 15., ("12pm", "Wind Speed"): 12.5,
... ("1pm", "Temperature"): 15.5, ("1pm", "Wind Speed"): 9.2})
>>> temps = weather[:,"Temperature"]
>>> for k in temps:
... print("The temperature at {:4s} is {:f}".format(k, temps[k]))
The temperature at 12pm is 15.000000
The temperature at 1pm is 15.500000
>>> noon_weather = weather["12pm",:]
>>> for k in noon_weather:
... print("The {:s} is {:f}".format(k, noon_weather[k]))
The Temperature is 15.000000
The Wind Speed is 12.500000
Install
slict is on the Python Package Index (PyPI):
pip install slict
Metadata
Release files for slict 0.2.5
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 | |
|---|---|---|---|---|
| slict-0.2.5.tar.gz | 3.0 kB | Without provenance | Details |
Release files / slict-0.2.5.tar.gz
| Download URL | slict-0.2.5.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9394a19bc8de36fbefd23f24fdd7358dd183101be92fb8de45f2bb46e5b4ac1
|
|
BLAKE2b-256 checksum How to use checksums |
307f9af907f2caf7af1c3b5cf17932c90a9bf4b7bc1c508ae9313eb4cf18b0fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for slict 0.2.5
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.