Skip to main content
The Python generator writes a complete importable package into your repository. Your schema owns the public models and method tree; repost-client owns runtime behavior, so generated code stays small and reviewable.

Configure the output

repost/schema.repost
output is required and resolves relative to the schema file. Its final directory name must be a valid Python package name because it becomes the import path. Keep each generator in its own directory. The output is engine-owned. Do not hand-edit it or add application files inside it. Regeneration stages the complete tree and replaces engine-owned files atomically.

What gets emitted

Commit the whole package with the schema migration that produced it.

Generated models and methods

For this schema:
the package exports a keyword-only User dataclass and a method at client.webhooks.user.created(...). Every method requires customer_id and data, and accepts optional idempotency_key and cancel keyword arguments. Optional fields retain three distinct states: UNSET omits the field or applies its schema default, None sends JSON null when the schema permits it, and any other value is serialized. Payload fields follow schema declaration order and use their @map wire names.

Regenerate and check drift

migrate dev records the schema change and regenerates every configured language. generate --check writes nothing and exits non-zero when committed output is stale, making it the CI gate for generated Python packages. In a monorepo, one schema can contain several generators. One CLI run updates them as a unit; see Polyglot monorepos for output and commit rules.

Runtime compatibility

RepostClient() checks the generated descriptor format against the installed runtime before accepting a send. RepostDescriptorVersionError means you must regenerate the package or upgrade repost-client. Generated clients also guard imports of the runtime surfaces they require. An older runtime fails immediately with an actionable upgrade message instead of falling through to a partially compatible send path.

Continue

Configuration

Configure the runtime owned by the generated client.

Testing

Exercise generated methods with the native no-network testing kit.

Migrations & deploys

Version and deploy the schema that drives generation.