deep_isin
deep_isin is a Python package that allows you to safely check whether a specific value exists in nested data structures such as dictionaries, lists, tuples, and sets. It also safely handles circular references to prevent infinite recursion.
Installation:
pip install deep_isin
Usage:
- Import the entire module:
import deep_isin
data = {123: [1, 2, {456: [7, 8]}], "abc": (9, 10)}
print(deep_isin.isin(data, 7)) # True
print(deep_isin.isin(data, 99)) # False
- Import the function directly:
from deep_isin import isin
data = {123: [1, 2, {456: [7, 8]}], "abc": (9, 10)}
print(isin(data, 456)) # True
print(isin(data, 0)) # False
Features:
- Works with nested dictionaries, lists, tuples, and sets.
- Checks both keys and values in dictionaries.
- Handles circular references safely to avoid infinite recursion.
- Can handle any mix of nested Python data structures.
Metadata
Release files for deep-isin 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deep_isin-1.0.1.tar.gz | 2.0 kB | Without provenance | Details for deep_isin-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deep_isin-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for deep_isin-1.0.1-py3-none-any.whl |
Total release size: 4.3 kB
Release files / deep_isin-1.0.1.tar.gz
| Download URL | deep_isin-1.0.1.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef6348f07659160da8841e92ae0e7cf45776e2fb2d00495652ae4b000111fcfc
|
|
BLAKE2b-256 checksum How to use checksums |
6b6523a6e13048eeb138f65c257a2691992787d320a575d51967f137a79e6c03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Release files / deep_isin-1.0.1-py3-none-any.whl
| Download URL | deep_isin-1.0.1-py3-none-any.whl |
|---|---|
| Size | 2.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29fa0b23f3022072e6e4eecc9c4fa60ba58fc2fb33888d3280da8690d06eaa0b
|
|
BLAKE2b-256 checksum How to use checksums |
13cf69a2d7e0def41ecbdcff4b38c0d009cf760bac688a5079848667eb118bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Security for deep-isin 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.