What is Arnio?
Arnio is the data trust layer for Python. It answers one question:
"Is this data trustworthy?"
It answers through three verbs: validate, clean, and profile.
Think of it as Pydantic for DataFrames.
Install
pip install arnio
Quick Start
import arnio as ar
import pandas as pd
df = pd.DataFrame({
"email": ["alice@example.com", "not-an-email", None],
"age": [25, -5, 200],
"name": ["Alice", "Bob", "Charlie"],
})
# Profile — instant data quality overview
report = ar.profile(df)
print(report.quality_score) # 0–100
# Validate — check against a schema
schema = ar.Schema({
"email": ar.Email(nullable=False),
"age": ar.Int(min=0, max=150),
"name": ar.String(min_length=1),
})
result = ar.validate(df, schema)
print(result.passed) # False
print(result.issues) # Structured list of issues
# Clean — declarative cleaning pipeline
cleaned = ar.clean(df, [
"strip_whitespace",
"drop_duplicates",
("normalize_case", {"case": "lower"}),
])
# Suggest — intelligent cleaning suggestions
suggestions = ar.suggest(df)
Three Core Verbs
| Verb | Function | Purpose |
|---|---|---|
| Validate | ar.validate(df, schema) |
Check if data matches a contract |
| Clean | ar.clean(df, steps) |
Apply declarative cleaning operations |
| Profile | ar.profile(df) |
Measure data quality with scores and metrics |
Schema Definition
Two ways to define the same schema:
# Dict-based (dynamic, config-driven)
schema = ar.Schema({
"email": ar.Email(nullable=False),
"age": ar.Int(min=0, max=150),
"name": ar.String(min_length=1),
})
# Class-based (IDE-friendly, inheritable)
class Customers(ar.Schema):
email = ar.Email(nullable=False)
age = ar.Int(min=0, max=150)
name = ar.String(min_length=1)
Available Field Types
| Type | Description |
|---|---|
ar.Int |
Integer with optional min/max |
ar.Float |
Float with optional min/max |
ar.String |
String with optional length/pattern |
ar.Bool |
Boolean |
ar.Date |
Date string with format validation |
ar.DateTime |
DateTime string with format validation |
ar.Email |
Email address |
ar.URL |
HTTP/HTTPS URL |
ar.PhoneNumber |
Phone number |
ar.IPAddress |
IPv4 or IPv6 address |
ar.UUID |
UUID string |
ar.Regex |
Custom regex pattern |
Cleaning Pipeline
# One-shot cleaning
cleaned = ar.clean(df, [
"strip_whitespace",
"drop_duplicates",
("fill_nulls", {"column": "category", "value": "unknown"}),
"slugify_column_names",
])
# Reusable pipeline
pipe = ar.Pipeline([
"strip_whitespace",
"drop_duplicates",
("normalize_case", {"case": "lower"}),
])
cleaned = pipe.run(df)
# Save/load for version control
yaml_str = pipe.to_yaml()
pipe = ar.Pipeline.from_yaml(yaml_str)
Quality Gates (CI/CD)
# In a test file or CI script
ar.check(df, schema) # Raises ar.ValidationError on failure
pandas Accessor
import arnio # Registers the accessor
df.arnio.profile()
df.arnio.validate(schema)
df.arnio.clean(["strip_whitespace"])
df.arnio.suggest()
df.arnio.is_valid(schema) # Returns bool
Works With
- pandas DataFrames (primary)
- dict / list of dicts (no pandas import needed for simple cases)
- Polars DataFrames (v2.1)
What Arnio Does NOT Do
Arnio stays in its lane. It does not:
- Query or filter data (use pandas/Polars)
- Perform analytics (use pandas/Polars/DuckDB)
- Do feature engineering (use scikit-learn)
- Create visualizations (use matplotlib/Plotly)
- Manage file formats (use PyArrow)
License
MIT — Anish Raj
Metadata
Release files for arnio 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arnio-2.0.0.tar.gz | 39.1 MB | Without provenance | Details for arnio-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arnio-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for arnio-2.0.0-py3-none-any.whl |
Total release size: 39.2 MB
Release files / arnio-2.0.0.tar.gz
| Download URL | arnio-2.0.0.tar.gz |
|---|---|
| Size | 39.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc509758b7b90f431ffe14622b13bccb0f2a1a83e50f7ab1c318f08014800938
|
|
BLAKE2b-256 checksum How to use checksums |
2b44b8d17ffa7db332813f953b22c1c709e7e8339e40e4b78fb41b4f86d5dcf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / arnio-2.0.0-py3-none-any.whl
| Download URL | arnio-2.0.0-py3-none-any.whl |
|---|---|
| Size | 45.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
733a00015b7c65cc0bf26b546a3cc463bb2b8097795c763edb16db07da7ed766
|
|
BLAKE2b-256 checksum How to use checksums |
cde0fab08dabda88b8619c3e1e6c9bfe3f486ef0725687465c35fd4b7e95319e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for arnio 2.0.0
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.