User Guide#

This guide explains InitO’s decorators and how to use them. For the complete list of every symbol, option, and exception, see the API reference.

Getting started#

  • Installation — install InitO and enable the mypy plugin.

  • Concepts — the boilerplate problem InitO solves, and how it stays fast.

  • Quick start — a guided tour of every decorator.

Decorators#

InitO is a set of small, focused decorators — one per capability, plus the all-in-one @Data.

  • @Data — constructor, repr, eq/hash, accessors.

  • @Value — an immutable, setter-free data class.

  • Accessors@Getter / @Setter.

  • @ToString — a readable __repr__.

  • @EqualsAndHashCode — value equality and hashing.

  • Constructors@NoArgsConstructor, @AllArgsConstructor, @RequiredArgsConstructor.

  • @Builder — a fluent, chainable builder.

Dependency injection#

Recipes and guides#

  • Frameworks — using InitO with Django, FastAPI, Sanic, Pydantic, and SQLAlchemy.

  • Recipes — real-world, combined-decorator patterns.

  • Examples — the runnable scripts from the repository.

  • Migration — coming from dataclasses or attrs.

Help#