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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file find_where-1.0.0.tar.gz.
File metadata
- Download URL: find_where-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76d8255368db0190a36ace7fd3d966b8e3d1f5eb51d8a9ccac0cea5bab706d5a
|
|
| MD5 |
66f242b0d9657c5994abf24809d9dfc8
|
|
| BLAKE2b-256 |
642983d686d9131f35087fbb19cb788620f0366027b0f2ca9327c6a145c03735
|
File details
Details for the file find_where-1.0.0-py3-none-any.whl.
File metadata
- Download URL: find_where-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f06d724e8368b69d0d60d70845da52b90175edaaa0f7ce5cb912a2ee5bea0e43
|
|
| MD5 |
530b146f17643ffe33c52af110700702
|
|
| BLAKE2b-256 |
6128c21be0a0d553f67bfed5d1bb6bdca1136a7dd7d5778bd878f3644a3b68d8
|