
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
A Python-based data validation framework for CSV and JSON data. This project provides a unified approach to validate data formats and contents using specialised validators built on a common foundation. The framework is easily extendable and leverages industry-standard libraries such as Pandas, Polars, and Pydantic.
The Data Validator Framework is designed to simplify and standardise data validation tasks. It consists of:
BaseValidator
class that defines a standard interface and error management for all validators.CSV Validation
JSON Validation
Extensible Architecture
BaseValidator
) that standardises validation methods.Clone the Repository:
pip install px_processor
poetry add px_processor
uv add px_processor
--
from processor import CSVValidator
validator = CSVValidator(
csv_paths=["data/file1.csv", "data/file2.csv"],
data_types=["str", "int", "float"],
column_names=["id", "name", "value"],
unique_value_columns=["id"],
columns_with_no_missing_data=["name"],
missing_data_column_mapping={"value": ["NaN", "None"]},
valid_column_values={"name": ["Alice", "Bob", "Charlie"]},
drop_columns=["unused_column"],
strict_validation=True,
)
validator.validate()
from pydantic import BaseModel
from processor import JSONValidator
class UserModel(BaseModel):
id: int
name: str
email: str
json_data = {
"id": 123,
"name": "Alice",
"email": "alice@example.com"
}
validator = JSONValidator(model=UserModel, input_=json_data)
validator.validate()
--
validator/
├── .gitignore
├── .python-version
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── pyproject.toml
├── uv.lock
├── requirements.txt
├── README.md
├── src/
└── validator/
└── config/
│ ├── __init.py__
│ └── csv_.py # Configuration settings for CSV validation.
├── __init.py__
├── base.py # Abstract base class for validators.
├── errors.py # Custom error classes for validation.
├── README.md
├── csv/
│ ├── __init.py__
│ ├── README.md
│ └── main.py # CSV validation implementation.
└── json/
│ ├── __init.py__
│ ├── README.md
│ └── main.py # JSON validation implementation.
└── tests/
├── __init.py__
├── config.py # Test configuration settings.
|── integration/
| ├── __init.py__
| ├── test_integration_json.py # Integration tests for JSON validation.
| └── test_integration_csv.py # Integration tests for CSV validation.
├── unit/
| ├── __init.py__
| ├── test_csv.py # Unit tests for CSV validation.
| └── test_json.py # Unit tests for JSON validation.
├── csvs/ # CSV files for testing.
└── jsons/ # JSON files for testing.
Contributions are welcome! Please adhere to standard code review practices and ensure your contributions are well tested and documented.
This project is licensed under the MIT License. See the LICENSE file for details.
To generate requirements.txt
uv export --format requirements.txt --no-emit-project --no-emit-workspace --no-annotate --no-header --no-hashes --no-editable -o requirements.txt
To generate CHANGELOG.md
uv run git-cliff -o CHANGELOG.md
To bump version.
uv run bump-my-version show-bump
FAQs
Process and validate JSON and CSV data with ease.
We found that px-processor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.