Skip to main content

ValidateLite

Python 3.8+ License: MIT Code Coverage

ValidateLite: A lightweight data validation tool for engineers who need answers, fast.

Unlike other complex data validation tools, ValidateLite provides two powerful, focused commands for different scenarios:

  • vlite check: For quick, ad-hoc data checks. Need to verify if a column is unique or not null right now? The check command gets you an answer in 30 seconds, zero config required.

  • vlite schema: For robust, repeatable database schema validation. It's your best defense against schema drift. Embed it in your CI/CD and ETL pipelines to enforce data contracts, ensuring data integrity before it becomes a problem.


Core Use Case: Automated Schema Validation

The vlite schema command is key to ensuring the stability of your data pipelines. It allows you to quickly verify that a database table or data file conforms to a defined structure.

Scenario 1: Gate Deployments in CI/CD

Automatically check for breaking schema changes before they get deployed, preventing production issues caused by unexpected modifications.

Example Workflow (.github/workflows/ci.yml)

jobs:
  validate-db-schema:
    name: Validate Database Schema
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.9'

      - name: Install ValidateLite
        run: pip install validatelite

      - name: Run Schema Validation
        run: |
          vlite schema --conn "mysql://${{ secrets.DB_USER }}:${{ secrets.DB_PASS }}@${{ secrets.DB_HOST }}/sales" \
                           --rules ./schemas/customers_schema.json

Scenario 2: Monitor ETL/ELT Pipelines

Set up validation checkpoints at various stages of your data pipelines to guarantee data quality and avoid "garbage in, garbage out."

Example Rule File (customers_schema.json)

{
  "customers": {
    "rules": [
      { "field": "id", "type": "integer", "required": true },
      { "field": "name", "type": "string", "required": true },
      { "field": "email", "type": "string", "required": true },
      { "field": "age", "type": "integer", "min": 18, "max": 100 },
      { "field": "gender", "enum": ["Male", "Female", "Other"] },
      { "field": "invalid_col" }
    ]
  }
}

Run Command:

vlite schema --conn "mysql://user:pass@host:3306/sales" --rules customers_schema.json

Quick Start: Ad-Hoc Checks with check

For temporary, one-off validation needs, the check command is your best friend.

1. Install (if you haven't already):

pip install validatelite

2. Run a check:

# Check for nulls in a CSV file's 'id' column
vlite check --conn "customers.csv" --table customers --rule "not_null(id)"

# Check for uniqueness in a database table's 'email' column
vlite check --conn "mysql://user:pass@host/db" --table customers --rule "unique(email)"

Learn More


📝 Development Blog

Follow the journey of building ValidateLite through our development blog posts:


📄 License

This project is licensed under the MIT License.

Metadata

Release files for validatelite 0.4.2

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

Source distribution (sdist)

Source distribution for validatelite 0.4.2
File Size Uploaded Provenance Actions
validatelite-0.4.2.tar.gz 285.5 kB Without provenance Details for validatelite-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for validatelite 0.4.2
File Interpreter ABI Platform Actions
validatelite-0.4.2-py3-none-any.whl Python 3 none any Details for validatelite-0.4.2-py3-none-any.whl

Total release size: 445.9 kB

Release files / validatelite-0.4.2.tar.gz

Download URL validatelite-0.4.2.tar.gz
Size 285.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b92b2bd9b0fa2260e2f3cb2d4529ca5b1e61718b27a2b9e227a64306c1cd0215
BLAKE2b-256 checksum
How to use checksums
d4d1651b2402a1c32e8b433e30f992e7c78afa46973a1a574449b21e059c1f1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / validatelite-0.4.2-py3-none-any.whl

Download URL validatelite-0.4.2-py3-none-any.whl
Size 160.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0abc653fe06d31ef12847283800c1466eae4a5a18283c3f535c09fa0281a978b
BLAKE2b-256 checksum
How to use checksums
5cb7b72312d0dff165ddd1514f9e2f6987a990d5f1dc8b34d4773f50936eced0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.11.13

Security for validatelite 0.4.2

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