# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'src'}

modules = \
['pydict_filter']
setup_kwargs = {
    'name': 'pydict-filter',
    'version': '0.1.0',
    'description': 'This package will help you to smart filter dictionary fields.',
    'long_description': '# py-dict-filter\nThis package allowed you to perform smart filtering for your dictionary.\n## deny_filter(filtering_dict, filter_list, current_path="")\nWhen you use this method, you specify which fields to filter out. For example, we have next dictionary:\n```\n{\n    "top_key_1": "top_value",\n    "top_key_2": {\n        "middle_key_1": "middle_value",\n        "middle_key_2": "middle_value",\n        "middle_key_3": "middle_value"\n    },\n    "top_key_3": [\n        {\n            "middle_key_4": "middle_value",\n            "middle_key_5": "middle_value"\n        }\n    ],\n    "top_key_4": "top_value"\n}\n```\n\nIf you want to deny some filed, you need to add this filed in the filter_list. Here cases filter string and examples:\n- Deny top level fields: `top_key_1`, `top_key_3` etc.\n- Deny all top level fields: `*`\n- Deny fields from nested dict: `top_key_2.middle_key_2`, `top_key_3.middle_key_5`\n- Deny all fields from nested dict: `top_key_2.*`, `top_key_3.*`\n\nFor example if you call this method with example dictionary as filtering_dict and `filter_list=["top_key_4", "top_key_3.middle_key_4", "top_key_2.*"]`\nyou will get next result:\n\n```\n{\n    "top_key_1": "top_value",\n    "top_key_3": [\n        {\n            "middle_key_5": "middle_value"\n        }\n    ],\n    "top_key_2": {}\n}\n```\n\n## allow_filter(filtering_dict, filter_list, current_path=""):\nWhen you use this method, you specify which fields should be present in a dictionary. For example, we have next dictionary:\n```\n{\n    "top_key_1": "top_value",\n    "top_key_2": {\n        "middle_key_1": "middle_value",\n        "middle_key_2": "middle_value",\n        "middle_key_3": "middle_value",\n        "middle_key_4": {\n            "low_level_key_1": "low_value",\n            "low_level_key_2": "low_value"\n        }\n    },\n    "top_key_3": [\n        {\n            "middle_key_4": "middle_value",\n            "middle_key_5": "middle_value"\n        }\n    ],\n    "top_key_4": "top_value"\n}\n```\n\nIf you want to deny some filed, you need to add this filed in the filter_list. Here cases filter string and examples:\n- Allow top level fields: `top_key_1`, `top_key_3` etc.\n- Allow all top level fields: `*`\n- Allow fields from nested dict: `top_key_2.middle_key_2`, `top_key_3.middle_key_5`, `top_key_2.middle_key_4.low_level_key_2`\n- Allow all fields from nested dict: `top_key_2.*`, `top_key_3.*`, `top_key_2.middle_key_4.*`\n\nFor example if you call this method with example dictionary as filtering_dict and `filter_list=["top_key_1", "top_key_2", \n"top_key_3", "top_key_3.*", "top_key_2.middle_key_1", "top_key_2.middle_key_2", "top_key_2.middle_key_4.*"]`\nyou will get next result:\n\n```\n{\n    "top_key_1": "top_value",\n    "top_key_3": [\n        {\n            "middle_key_4": "middle_value",\n            "middle_key_5": "middle_value"\n        }\n    ],\n    "top_key_2": {\n        "middle_key_2": "middle_value",\n        "middle_key_1": "middle_value"\n    }\n}\n```\n\n**PAY ATTENTION!** Despite the fact that all fields for `top_key_2.middle_key_4` were allowed, they did not present in the result. \nThis happened because `top_key_2.middle_key_4` was not allowed in `top_key_2` dictionary.',
    'author': 'Kamenlom',
    'author_email': 'ivashchenko.roman111@gmail.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/Nextpertise/py-dict-filter',
    'package_dir': package_dir,
    'py_modules': modules,
    'python_requires': '>=3.5,<4.0',
}


setup(**setup_kwargs)
