Skip to content

ya332/deepextract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintenance made-with-python PyPI version fury.io PyPI pyversions PyPI status Downloads GitTutorial

deepextract 🔥

A Python library to parse JSON, YAML files and extract deeply nested keys.

Usage 🎯

from deepextract import deepextract

# Demo: deepextract.extract_key(obj, key)
deeply_nested_dict = {
    "items": {
        "item": {
            "id": {
                "type": {
                    "donut": {
                        "name": {
                            "batters": {
                                "my_target_key": "my_target_value"
                            }
                        }
                    }
                }
            }
        }
    }
}
print(deepextract.extract_key(deeply_nested_dict, "my_target_key") == "my_target_value") # prints True

See examples folder for more.

Installation ⚠️

pip install deepextract

Requirements 🌌

Support for Python 3.6 and greater.

Development 🛎️

conda create -n deepextract_env python=3.7 # do it once
conda install -r requirements.txt

Source code is in deepextract. Start editing and Happy contributing! 🌟

Deployment to PyPI 💎

Based on descriptions from here, whenever project owner pushes a tagged commit to this Git repository remote on GitHub, GH workflow will publish it to PyPI.

And it'll publish any push to TestPyPI which is useful for providing test builds to repo's alpha users as well as making sure that your release pipeline remains healthy.

Manual deploy to TestPyPI:

python setup.py sdist bdist_wheel
twine upload -r testpypi dist/*

Running tests 🔥

python -m unittest

Licence ✅

MIT. See LICENSE.md

Version

Follows syntax vM.M.P First is major and means not backwards compatible changes. Second is minor and means backwards compatible changes. Third is patch and means small backwards compatible changes.

The manual place of source of truth for the version is at deepextract/__init__.py

Source: https://packaging.python.org/guides/single-sourcing-package-version/#single-sourcing-the-version

Authors ✏️

deepextract was written by Yigit Alparslan.

About

A Python library to parse JSON, YAML files and extract deeply nested keys.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages