Va

Validatedata – lightweight inline data validation for Python

Hacker News

Validatedata – lightweight inline data validation for Python

I revived a small project I abandoned ~5 years ago and just released v0.2 on PyPI: validatedata. It's a lightweight Python library for inline data validation—think quick checks on dicts, lists, function args, or API payloads without defining full schema classes like in Pydantic. Why revive it? I kept running into cases where Pydantic (or Marshmallow) felt like overkill for scripts, CLIs, simple backends, or one-off data cleaning. I wanted something expressive but minimal: inline rules, decorators, no boilerplate models, built-in checks (email/url/phone/regex/range/length/unique/nullable/transforms/conditionals/nested), and clean error output. Core ways to use it: 1. Standalone on data: ```python from validatedata import validate_data data = {"username": "alice", "email": "alice@example.com", "age": 25} rules = {"keys": { "username": {"type": "str", "range": (3, 32)}, "email": {"type": "email"}, "age": {"type": "int", "range": (18, "any")} }} result = validate_data(data, rules) if result.ok: print("Valid!") else: print(result.errors) # e.g. ["age: must be at least 18"] Features include: Shorthand rules like 'email', 'int:18:to:99', 'phone' Conditional (depends_on), transforms (strip/upper), mutation for cleaned data Nested fields/items, strict/no-coercion mode Powered by dateutil for flexible date parsing (ISO, natural-ish formats) MIT licensed, pytest on PRs, Python >=3.7, only optional dep (phonenumbers for phone) Install: pip install validatedata Repo: https://github.com/Edward-K1/validatedata PyPI: https://pypi.org/project/validatedata/ Happy to hear feedback, bug reports, feature ideas, or use-case stories—especially if this saves anyone time on lightweight validation. Does this fill a gap for you, or am I missing something obvious? Thanks!

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
69%69% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: model, user, models · Missing: mac, agents, macos
55%55% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
50%50% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: just released, ide, io · Missing: https docs, excited, exist
38%38% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
35%35% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

A
A Python Libary That Simplifies Data Validation50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Python Libary That Simplifies Data Validation

Hacker News8
As
Assent.js - lightweight inline form validation44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Assent.js - lightweight inline form validation

Hacker News2
In
Inline C in Python63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Inline C in Python

Hacker News14
In
Inline C from within python63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Inline C from within python

Hacker News12
Va
Valito-Progressive validation for Python based on typehints & dataclass34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Valito-Progressive validation for Python based on typehints & dataclass

Hacker News2
Py
Pydantic – Data validation using Python 3.6 type hinting36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pydantic – Data validation using Python 3.6 type hinting

Hacker News120
Va
Validr – The fastest data validation library in python60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Validr – The fastest data validation library in python

Hacker News3
Li
Litmus – Data Validation in Elixir56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Litmus – Data Validation in Elixir

Hacker News1
Po
Polars Data Validation with Pandera28%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Polars Data Validation with Pandera

Hacker News2
Ko
Koda Validate – Typesafe, combinable validation for Python31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Koda Validate – Typesafe, combinable validation for Python

Hacker News30