py-data-validator


Namepy-data-validator JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryPython data validation library
upload_time2024-09-09 04:01:01
maintainerNone
docs_urlNone
authorKrunal Dodiya
requires_python<4.0,>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyDataValidator

[![Documentation](https://img.shields.io/badge/docs-online-blue)](https://krunals-organization-2.gitbook.io/pydatavalidator) [![PyPI](https://img.shields.io/pypi/v/py-data-validator)](https://pypi.org/project/py-data-validator/)

# Introduction

**PyDataValidator** is a powerful and flexible Python library designed to streamline data validation processes. Whether you're building data pipelines, developing web applications, or handling complex datasets, PyDataValidator offers a comprehensive suite of tools to ensure your data is clean, consistent, and reliable.

#### Key Features

- **Comprehensive Rule Set**:
  - Validate data with a wide range of built-in rules, including checks for required fields, conditional presence, format validation, and more.
  - Examples include rules for ensuring fields are present, validating email formats, checking numeric ranges, and enforcing unique constraints.
- **Custom Validators**:
  - Easily create and integrate custom validation rules tailored to your specific needs.
  - Extend the library with your own validation logic to handle any specific data requirements.
- **Chainable Validation**:
  - Build complex validation logic by chaining multiple rules together for more nuanced data integrity checks.
  - Combine rules like `Required`, `Min`, and `Email` in a single, readable chain to enforce multiple conditions on a single field.
- **Detailed Error Reporting**:
  - Generate clear, actionable error messages that help you quickly identify and resolve data issues.
  - Each validation failure is accompanied by descriptive messages indicating the nature of the error and the affected data fields.
- **Ease of Use**:
  - Designed with simplicity in mind, PyDataValidator's intuitive API allows you to validate data with minimal code.
  - Quickly set up validations using a declarative syntax that integrates seamlessly into your Python projects.
- **Highly Extensible**:
  - Flexible architecture that integrates seamlessly with other libraries and frameworks, making it ideal for use in a variety of projects.
  - Whether you're working with Flask, Django, or standalone scripts, PyDataValidator adapts to your environment.

# Installation

```bash
pip install py_data_validator
```

```python
from py_data_validator.validator import Validator

# Define the data to be validated
data = {"name": "John Doe", "email": "johndoe@example.com"}

# Define the validation rules
rules = {
    "name": ["required"],
    "email": ["required", "email"],
}

# Create a Validator instance
validator = Validator(data,rules)

# Perform the validation
response = validator.validate()

# Check if validation failed and print the errors if any
if response.validated:
    print("Validation passed!", response.data)
else:
    print("Validation failed with errors:", response.errors)
```

After installing the `PyDataValidator` package, providing a list of available validation rules is a great way to help users quickly understand the capabilities of the library..

## Contributing

Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request on [GitHub](https://github.com/krunaldodiya/py-data-validator).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## More Information

For more information, visit the [documentation](https://krunals-organization-2.gitbook.io/pydatavalidator) or view the package on [PyPI](https://pypi.org/project/py-data-validator).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-data-validator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Krunal Dodiya",
    "author_email": "kunal.dodiya1@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/82/83/dd2d4035c1815fa7b021f09ddc7763d131852c1518ac1ed439484e1c3508/py_data_validator-0.1.4.tar.gz",
    "platform": null,
    "description": "# PyDataValidator\n\n[![Documentation](https://img.shields.io/badge/docs-online-blue)](https://krunals-organization-2.gitbook.io/pydatavalidator) [![PyPI](https://img.shields.io/pypi/v/py-data-validator)](https://pypi.org/project/py-data-validator/)\n\n# Introduction\n\n**PyDataValidator** is a powerful and flexible Python library designed to streamline data validation processes. Whether you're building data pipelines, developing web applications, or handling complex datasets, PyDataValidator offers a comprehensive suite of tools to ensure your data is clean, consistent, and reliable.\n\n#### Key Features\n\n- **Comprehensive Rule Set**:\n  - Validate data with a wide range of built-in rules, including checks for required fields, conditional presence, format validation, and more.\n  - Examples include rules for ensuring fields are present, validating email formats, checking numeric ranges, and enforcing unique constraints.\n- **Custom Validators**:\n  - Easily create and integrate custom validation rules tailored to your specific needs.\n  - Extend the library with your own validation logic to handle any specific data requirements.\n- **Chainable Validation**:\n  - Build complex validation logic by chaining multiple rules together for more nuanced data integrity checks.\n  - Combine rules like `Required`, `Min`, and `Email` in a single, readable chain to enforce multiple conditions on a single field.\n- **Detailed Error Reporting**:\n  - Generate clear, actionable error messages that help you quickly identify and resolve data issues.\n  - Each validation failure is accompanied by descriptive messages indicating the nature of the error and the affected data fields.\n- **Ease of Use**:\n  - Designed with simplicity in mind, PyDataValidator's intuitive API allows you to validate data with minimal code.\n  - Quickly set up validations using a declarative syntax that integrates seamlessly into your Python projects.\n- **Highly Extensible**:\n  - Flexible architecture that integrates seamlessly with other libraries and frameworks, making it ideal for use in a variety of projects.\n  - Whether you're working with Flask, Django, or standalone scripts, PyDataValidator adapts to your environment.\n\n# Installation\n\n```bash\npip install py_data_validator\n```\n\n```python\nfrom py_data_validator.validator import Validator\n\n# Define the data to be validated\ndata = {\"name\": \"John Doe\", \"email\": \"johndoe@example.com\"}\n\n# Define the validation rules\nrules = {\n    \"name\": [\"required\"],\n    \"email\": [\"required\", \"email\"],\n}\n\n# Create a Validator instance\nvalidator = Validator(data,rules)\n\n# Perform the validation\nresponse = validator.validate()\n\n# Check if validation failed and print the errors if any\nif response.validated:\n    print(\"Validation passed!\", response.data)\nelse:\n    print(\"Validation failed with errors:\", response.errors)\n```\n\nAfter installing the `PyDataValidator` package, providing a list of available validation rules is a great way to help users quickly understand the capabilities of the library..\n\n## Contributing\n\nContributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request on [GitHub](https://github.com/krunaldodiya/py-data-validator).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## More Information\n\nFor more information, visit the [documentation](https://krunals-organization-2.gitbook.io/pydatavalidator) or view the package on [PyPI](https://pypi.org/project/py-data-validator).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python data validation library",
    "version": "0.1.4",
    "project_urls": {
        "documentation": "https://krunals-organization-2.gitbook.io/pydatavalidator",
        "homepage": "https://www.proalgotrader.com",
        "repository": "https://github.com/krunaldodiya/py-data-validator"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "606c71e704f94c7c2dc3ce516ab367c334115c6abf3289469a9a43dacbbc073d",
                "md5": "006332503c7e833edcecdf28389e9ca8",
                "sha256": "c70d98f5ad23f0fc0805678fc08cea60e534e52487543cd27c777bbcc3f5bc57"
            },
            "downloads": -1,
            "filename": "py_data_validator-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "006332503c7e833edcecdf28389e9ca8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 17547,
            "upload_time": "2024-09-09T04:00:59",
            "upload_time_iso_8601": "2024-09-09T04:00:59.490309Z",
            "url": "https://files.pythonhosted.org/packages/60/6c/71e704f94c7c2dc3ce516ab367c334115c6abf3289469a9a43dacbbc073d/py_data_validator-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8283dd2d4035c1815fa7b021f09ddc7763d131852c1518ac1ed439484e1c3508",
                "md5": "f176ca3cb549ba89d3f2ee618653d53f",
                "sha256": "85ea9c8fbdb6334ba4cef86c27178916f8e56a498d62a3793fb9ba9d9f519684"
            },
            "downloads": -1,
            "filename": "py_data_validator-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "f176ca3cb549ba89d3f2ee618653d53f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 10846,
            "upload_time": "2024-09-09T04:01:01",
            "upload_time_iso_8601": "2024-09-09T04:01:01.264693Z",
            "url": "https://files.pythonhosted.org/packages/82/83/dd2d4035c1815fa7b021f09ddc7763d131852c1518ac1ed439484e1c3508/py_data_validator-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-09 04:01:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "krunaldodiya",
    "github_project": "py-data-validator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "py-data-validator"
}
        
Elapsed time: 0.31370s