Skip to main content

Collection-related helpers.

Project description

coveo-itertools

Another spin on iteration goodness.

dict lookup

A one-liner function to retrieve a value from a dictionary:

from typing import Dict, Any
from coveo_itertools.lookups import dict_lookup


example: Dict[str, Any] = {'nested': {'key': {'lookup': True}}}

assert dict_lookup(example, 'nested', 'key', 'lookup') == True
assert dict_lookup(example, 'not', 'there', 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

coveo_itertools-2.0.11.tar.gz (1.6 kB view hashes)

Uploaded Source

Built Distribution

coveo_itertools-2.0.11-py3-none-any.whl (2.2 kB view hashes)

Uploaded Python 3

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