Skip to main content

DevL's own standard library for Python 3

Project description

Ormgrop

DevL's own standard library for Python 3.

Collections

get_in and require_in

Access values in nested Python structures that respond to the [] indexing syntax.

Inspired by of Elixir's get_in. If you squint.

Usage

For "soft" getting a value, use get_in(collection, path) where path is a list of keys/indices. This function optionally takes a default value to be returned if the final key/index is not found. By default this is None.

For "hard" getting a value, use require_in(collection, path) where path is a list of keys/indices. This function raises a NestedValueNotFoundError if the final key/index is not found.

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

ormgrop-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

ormgrop-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file ormgrop-0.1.0.tar.gz.

File metadata

  • Download URL: ormgrop-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for ormgrop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e185b113815965b8805b65b5c1abce4383b05718a0af16a8640ab2b79d810f6
MD5 1ee6d907fbb63a33684198d0b03c0b94
BLAKE2b-256 2f52c7ed42593ad22792a3f7eed5784900f9142074336c8704b04d755815fad3

See more details on using hashes here.

File details

Details for the file ormgrop-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ormgrop-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for ormgrop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92ad8eeb377efd59a806902d631fcc6ad9adb1d782a313449a5d3f7a737e0130
MD5 15f770c80ab6d238ef5befb10ee807d2
BLAKE2b-256 d681599a64198f83366eef02e1d3ca8a6259a85a9745227f1b2bf37ae5d4ecd1

See more details on using hashes here.

Supported by

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