Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gloomy-0.2.2.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gloomy-0.2.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file gloomy-0.2.2.tar.gz.

File metadata

  • Download URL: gloomy-0.2.2.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for gloomy-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a654b1c8447cacbfb6654c11155b30d4b8dfff6bab588e5d12ecdbea8e34016b
MD5 6303cc22a7b26153bb30c49b4dc616e1
BLAKE2b-256 8ff5cd6f2e6a732228c56a0b894b326546c2baf3f96c53b9a437122f4426aef5

See more details on using hashes here.

File details

Details for the file gloomy-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: gloomy-0.2.2-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

Hashes for gloomy-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ddbf737275c99f4b276dfcbd844598ddcd66ba9e5cceb84a6d8a9d6e6920d7a
MD5 179b5594e4d927839fb27c4dc472c443
BLAKE2b-256 4905adbfc223bf855ce02ba9e9f168be1375dd5f69b1f279979bde7539677900

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page