
iron-monk
Business-constraint validation for people who hate data mutation.
A pure-Python validator with zero dependencies, zero coercion, and zero base classes. Just a decorator.
Why iron-monk
Most validation libraries do too much. They coerce your data, force you to inherit from a base class, and stop at the first error so you debug payloads one field at a time.
iron-monk flips all three.
-
Zero coercion
"123"is never silently rewritten to123. If a string is the wrong format, that is an error. -
Zero dependencies
Pure Python. No compiled binaries, no install-time toolchain, no
pydantic_corelurking in your container. -
Aggregate, don't fail-fast
Validation collects every error and reports them in a single
ValidationError. No whack-a-mole. -
Annotation is the schema
Constraints live inside
typing.Annotated. NoBaseModel, noSchemaclass, no metaclass.
A 30-second tour
from typing import Annotated
from monk import monk, validate
from monk.constraints import Email, Interval
@monk
class User:
email: Annotated[str, Email]
age: Annotated[int, Interval(ge=18)]
user = User(email="bad-email", age=12)
validate(user)
# ValidationError aggregating BOTH the email and age failures
Where to next
- Getting Started — installation, the validation lifecycle, error handling.
- Core Concepts — the four pillars and the philosophy behind them.
- Constraints — the full catalog of built-in rules.
- Advanced Usage — cross-field rules, custom constraints, settings.
- Integrations — Strawberry, Starlette, SQLAlchemy, Tortoise, tyro, beartype.