Skip to main content

find_where is a Python package that provides a function to find values in dictionaries where a specified key matches a given value, similar to filtering in SQL.

Project description

find_where

find_where is a Python package that provides a function to find values in dictionaries where a specified key matches a given value, similar to filtering in SQL.

Installation

You can install find_where using pip:

pip install find_where

Usage

from find_where import find_where

# Sample data

data = [
    {"name": "Alice", "age": 30},
    {"name": "Bob", "age": 25},
    {"name": "Charlie", "age": 35}
]

# Find the value for the key "name" where the age is 25

result = find_where(data, "name", age=25)
print(result)  # Output: "Bob"

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

find_where-1.0.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

find_where-1.0.0-py3-none-any.whl (3.8 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