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.3.tar.gz (17.5 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.3-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gloomy-0.2.3.tar.gz
Algorithm Hash digest
SHA256 fd94f3abf9aa0718014b99ad53b811fa731b48102c71c693a7d914d13f705be0
MD5 075529dc964c61d3961033f6a310b3f8
BLAKE2b-256 f4ba0a6c5e95abefc4e9e869a67f7fe46dd039e0ddf0d16a7a922a60514fe934

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gloomy-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for gloomy-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e159f5b2512c559167d62a0c9099c5159a8854c7cc2c2d5f303add67cd4e6351
MD5 acf9c89e66359c3ade4ecf49d013bff5
BLAKE2b-256 58bc969f68b1961c3a907c66f23964af7e66c3f77239f4491196e47bd7a10f1f

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