| Crates.io | term-core |
| lib.rs | term-core |
| version | 0.0.1 |
| created_at | 2025-07-26 18:40:27.00966+00 |
| updated_at | 2025-07-26 18:40:27.00966+00 |
| description | A Rust data validation library providing Deequ-like capabilities without Spark dependencies |
| homepage | https://github.com/term/term |
| repository | https://github.com/term/term |
| max_upload_size | |
| id | 1769359 |
| size | 920,896 |
Bulletproof data validation without the infrastructure headache.
Get Started β’ Documentation β’ Examples β’ API Reference
Every data pipeline is a ticking time bomb. Null values crash production. Duplicate IDs corrupt databases. Format changes break downstream systems. Yet most teams discover these issues only after the damage is done.
Traditional data validation tools assume you have a data team, a Spark cluster, and weeks to implement. Term takes a different approach:
Term is data validation for the 99% of engineering teams who just want their data to work.
# Add to your Cargo.toml
cargo add term-core tokio --features tokio/full
use term_core::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
// Load your data
let ctx = SessionContext::new();
ctx.register_csv("users", "users.csv", CsvReadOptions::new()).await?;
// Define what good data looks like
let checks = ValidationSuite::builder("User Data Quality")
.check(
Check::builder("No broken data")
.is_complete("user_id") // No missing IDs
.is_unique("email") // No duplicate emails
.has_pattern("email", r"@", 1.0) // All emails have @
.build()
)
.build();
// Validate and get instant feedback
let report = checks.run(&ctx).await?;
println!("{}", report); // β
All 3 checks passed!
Ok(())
}
That's it! No clusters to manage, no JVMs to tune, no YAML to write.
// Validate a production dataset with multiple quality checks
let suite = ValidationSuite::builder("Production Pipeline")
.check(
Check::builder("Data Freshness")
.satisfies("created_at > now() - interval '1 day'")
.has_size(Assertion::GreaterThan(1000))
.build()
)
.check(
Check::builder("Business Rules")
.has_min("revenue", Assertion::GreaterThan(0.0))
.has_mean("conversion_rate", Assertion::Between(0.01, 0.10))
.has_correlation("ad_spend", "revenue", Assertion::GreaterThan(0.5))
.build()
)
.build();
// Runs all checks in a single optimized pass
let report = suite.run(&ctx).await?;
π Data Quality
|
π Statistical
|
π‘οΈ Security
|
π Performance
|
Dataset: 1M rows, 20 constraints
Without optimizer: 3.2s (20 full scans)
With Term: 0.21s (2 optimized scans)
[dependencies]
term-core = "0.0.1"
tokio = { version = "1", features = ["full"] }
# Optional features
term-core = { version = "0.0.1", features = ["cloud-storage"] } # S3, GCS, Azure support
Check out the examples/ directory for real-world scenarios:
basic_validation.rs - Simple CSV validationcloud_storage_example.rs - Validate S3/GCS datatelemetry_example.rs - Production monitoringtpc_h_validation.rs - Complex business rulesOur documentation is organized using the DiΓ‘taxis framework:
We love contributions! Term is built by the community, for the community.
# Get started in 3 steps
git clone https://github.com/withterm/term.git
cd term
cargo test
Term is MIT licensed. See LICENSE for details.
Term stands on the shoulders of giants:
Ready to bulletproof your data pipelines?
β‘ Get Started β’ π Read the Docs β’ π¬ Join Community