Metadata-Version: 2.1
Name: JsonSearchEngine
Version: 1.0.0
Summary: A Python class for searching within JSON data structures
Home-page: https://github.com/omar1developer/jsonsearchengine
Author: omar khattara
Author-email: Omar Khattara <omar1developer@gmail.com>
Project-URL: Homepage, https://github.com/omar1developer/jsonsearchengine
Project-URL: Issues, https://github.com/omar1developer/jsonsearchengine/blob/main/LICENSE
Keywords: json,search
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3
Description-Content-Type: text/markdown
License-File: LICENSE

# JSON Search Engine

This is a Python class named JSONSearchEngine designed to facilitate searching within JSON data structures. The class provides methods to search for specific keys or values within JSON objects, as well as the ability to find occurrences of patterns using regular expressions.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar.

```bash
pip install JsonSearchEngine
```
# Example Package

This is a simple example package. You can use
[GitHub-flavored Markdown](https://github.com/omar1developer/jsonsearchengine/blob/main/tests/test.py)
to write your content.

## Usage

```python
from jsonsearch import JSONSearchEngine

# Example JSON data
data_json = {
    "name": "John",
    "age": 30,
    "address": {
        "city": "New York",
        "zipcode": "10001"
    },
    "emails": ["john@example.com", "john.doe@gmail.com"]
}

# Initialize JSONSearchEngine with JSON data
search_engine = JSONSearchEngine(data_json)

# Search for a specific key
key_results = search_engine.search_key("age")
print("Key results:", key_results)

# Search for a specific value
value_results = search_engine.search_value("New York")
print("Value results:", value_results)

# Find all occurrences of a pattern
pattern_results = search_engine.find_all(r'\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b')
print("Pattern results:", pattern_results)
```
## License

[MIT](https://github.com/omar1developer/jsonsearchengine/blob/main/LICENSE)
