No project description provided
Project description
gloomy
"glom but not as slow"
An utility for retrieving values from deeply nested object attributes, mapping keys, sequence indexes, or any combination of them.
Not meant as a drop in replacement for glom, only basic functionality is implemented.
A good use-case would be to improve existing codebases in which the glom pattern is commonly used for convenience, as it can significantly affect performance.
Installation
pip install gloomy
Usage
from gloomy import gloom
assert gloom({"a": {"b": {"c": [123]}}}, "a.b.c.0") == 123
# Or with a default in case the path is invalid
assert gloom({}, "a.b.c", default=None) is None
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gloomy-0.2.0.tar.gz.
File metadata
- Download URL: gloomy-0.2.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
771db9737369587dc39662d10dcc8d765e09c3decfc0dbefe6fd05163c914d0c
|
|
| MD5 |
609ded1ca13e2a8151603a2032f4012d
|
|
| BLAKE2b-256 |
05d535e72353191c1aeb3791c6ecbe3cc676c7a9412126692338cf6ecb302a68
|
File details
Details for the file gloomy-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gloomy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f92132f44352131ece75fb4248662e8ca7ccf3cc30fbbfc59079ac088c8be797
|
|
| MD5 |
de936cd8238bc4925a015056506b0fe7
|
|
| BLAKE2b-256 |
5dcc03cd3a19e0bcbd08d6aaecd23da5d3ae529f88ac1a3238a8342309dffad7
|