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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for find_where-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06d724e8368b69d0d60d70845da52b90175edaaa0f7ce5cb912a2ee5bea0e43 |
|
MD5 | 530b146f17643ffe33c52af110700702 |
|
BLAKE2b-256 | 6128c21be0a0d553f67bfed5d1bb6bdca1136a7dd7d5778bd878f3644a3b68d8 |