deepsearchdict - Deep search you dictionary
Utility package that helps you to compare two dictionary or json string and search deep in complex nested structure
Assumptions:
- Assuming python is installed on your system.
Install deepsearchdict on your system using :
pip install deepsearchdict
Description
- Takes three arguments
- Source JSON string which is the super set
- Target JSON string which will be searched in the Source
- Type of validation. There are three types of validations supported.
- keys : Deep searches only if the keys specified in target json are present in source json
- partial : Deep searches all the keys and values are compared partially if it is contained in the source string
- all : Deep searches all the keys and values and finds for exact match of values
- Method to invoke
DeepSearchDict(source_json,target_json,validation_type)
- Returns True if Target JSON is contained within Source JSON, else False
- Example
from deepsearchdict import DeepSearchDict
import json
# read the json from file
actual_result = json.load(open('source.json'))
expected_result = json.load(open('target.json'))
# invoke DeepSearchDict with source,target and validation type
if DeepSearchDict(source, target, "partial"):
print("Expected and Actual Results Matching")
else:
print("Expected and Actual Results Not Matching")
Metadata
Release files for nested-search 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nested_search-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for nested_search-0.0.2-py3-none-any.whl |
Release files / nested_search-0.0.2-py3-none-any.whl
| Download URL | nested_search-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
861c67826ca3c1b5c91c05d4c772ea05f879d88b9cc16b177808fafffd19b505
|
|
BLAKE2b-256 checksum How to use checksums |
4fea3a1857ad91aedc707d822a05c1f208ca20b67b347e2b2a5cb62b860ec266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Security for nested-search 0.0.2
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.