Skip to main content

DataGuard

Documentation PyPI

Introduction

DataGuard 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, DataGuard 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, DataGuard'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, DataGuard adapts to your environment.

Installation

pip install data-guard
from data_guard.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 DataGuard 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

More Information

For more information, visit the documentation or view the package on PyPI.

Metadata

Release files for data-guard 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for data-guard 0.0.4
File Size Uploaded Provenance Actions
data_guard-0.0.4.tar.gz 11.5 kB Without provenance Details for data_guard-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for data-guard 0.0.4
File Interpreter ABI Platform Actions
data_guard-0.0.4-py3-none-any.whl Python 3 none any Details for data_guard-0.0.4-py3-none-any.whl

Total release size: 29.9 kB

Release files / data_guard-0.0.4.tar.gz

Download URL data_guard-0.0.4.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
94f2ad67b742ee77e6d3f8892c9cc0f18578da5faf08f1b80dba2e4fb3d9d4e5
BLAKE2b-256 checksum
How to use checksums
6adca201ff237c8c4909273686043cddd3fb88c21970fed0c3e9dbf375fe8a47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

Release files / data_guard-0.0.4-py3-none-any.whl

Download URL data_guard-0.0.4-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05050192890db76d8271aad753f95db0f8675178f6323df12238adb86d579184
BLAKE2b-256 checksum
How to use checksums
e756a859b36a61f3b542f284420c95731959f94db75b4cde7d408ea724a09563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

Security for data-guard 0.0.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page