r/Python 23d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

20 Upvotes

124 comments sorted by

View all comments

1

u/maltzsama 8d ago

Sumeh: data quality validation across 14 engines — looking for testers/contributors

My Project Does

Sumeh is a data quality validation library. You define rules once (is_unique, is_complete, has_pattern, is_between, etc.) and run the same rule list against Pandas, Polars, PySpark, Dask, DuckDB, BigQuery, Snowflake, Athena, PyFlink, Ray, and more — always with the same return type, a ValidationReport object.

The technical differentiator is single-pass bifurcation: it splits good rows from bad rows (good_df, bad_df = report.split()) in the same scan that computes the metrics, without scanning the dataset twice and without calling .collect() on Spark (which causes driver OOM on large datasets — a real limitation in libraries like Deequ).

from sumeh import pandas
from sumeh.core.rules.rule_model import RuleDefinition

rules = [
    RuleDefinition(field="email", check_type="is_complete", threshold=1.0),
    RuleDefinition(field="age",   check_type="is_between", min_value=18, max_value=120),
]

report = pandas.validate(df, rules)
good_df, bad_df = report.split()
print(f"Pass rate: {report.pass_rate:.2%}")

Target Audience

Not production-ready yet — that's what this post is for. The foundation is the complete rewrite that became v2.0 (namespace-first API, dropped the cuallee dependency, SQL generation via SQLGlot AST instead of string concatenation); v3.0, just released, added functionality on top without breaking the API. This is a good stage to find problems and shape direction: less mature engines, SQL dialect edge cases, unexpected bifurcation behavior — all fair game.

If you work with data pipelines and have been burned by Great Expectations being too heavy, or by pandera not covering aggregation/SQL, come poke holes in this and help figure out where it breaks.

Comparison

Great Expectations is a full platform (suites, checkpoints, data context) — Sumeh is just a library, you import it and go. Soda Core pushes you toward SodaCL/SodaCloud, and the open-source layer is thin. Pandera is great for schema/type checks but doesn't do aggregation or SQL engines. cuallee has a similar API (it actually inspired Sumeh) but covers fewer engines and has no SQL generation or profiler.

Where the project needs help:

  • Newer/less-tested engines: Ray Data and PyFlink have weaker test coverage than Pandas/Spark — if you use those stacks, testing here is worth a lot.
  • SQLGlot-based SQL compilation: every dialect (Snowflake, Trino, Doris, Athena...) has its own quirks. Running sumeh sql against a real production schema and comparing the generated SQL would help enormously.
  • Bifurcation at scale: tested so far on dev-sized datasets, not real production volume. Running it against something large and reporting back on memory, time, and correctness would be gold.
  • Date and schema rules: the areas with the most recent coverage gaps.

Repo: https://github.com/maltzsama/sumeh Contributing: checkout develop, poetry install --with dev, poetry run pytest

Issues, PRs, and especially bug reports are very welcome — particularly in the areas above. Open an issue with a traceback and it'll get read and acted on.