Skip to main content

dryv-author

dryv-author is the Python Authoring SDK installed in an authored project. It mirrors the TypeScript author with Pythonic names, and produces a typed AuthorState that dryv-compiler lowers to canonical dryv.ir/v1alpha1.

The package does not depend on the Dryv Engine and never serializes Runtime IR, selects packs, renders templates, chooses output paths, or writes files.

Example

from dryv_author import body, dryv, field, http, operation, path, prop, respond, schema, storage

users = dryv.group("users")
accounts = users.feature("Accounts")                 # features are registration scopes

ids = accounts.properties({"Id": prop.string.uuid(), "Name": prop.string()})
models = accounts.schemas({
    "User": schema({
        "id": field(ids.Id).system(),
        "name": field(ids.Name).query(filter="*", sort=True),
    }).facets(storage=storage("users").primary_key("id")),
})

create = operation().role("create").inputs(models.User).outputs(models.User)
create.facets(
    http=http("POST", "/users").input(create.input(0), body()).output(create.output(0), respond(201)),
)
accounts.operations({"CreateUser": create})

users.schemas({"AuditEntry": schema({"id": field(ids.Id)})})   # group-owned: no feature

app = dryv.app("accounts").groups(users)

The entrypoint configured in dryv.yaml must expose exactly one module-level dryv.app(...). It may import ordinary modules; every registration records the caller's file and line.

Ownership

Registering through group.feature("Name") makes the group the declaration's group and the feature its feature. Registering directly on the group leaves it group-owned. A declaration can belong to one group and at most one feature (decision 0011).

API map (TypeScript → Python)

TypeScript Python
property.string.uuid() prop.string.uuid()
property.number.integer({ range: { min: 0 } }) prop.number.integer(range={"min": 0})
field(x).createOnly() field(x).create_only()
.query({ filter: ["notEqual"] }) .query(filter=["not-equal"]) (not_equal also accepted)
expression.and(...), .or(...), .not(...) expression.all_of(...), .any_of(...), .not_(...)
operation().async() operation().async_()
operationStep, waitFor, outputFrom, inputFrom operation_step, wait_for, output_from, input_from
group.policies(ref1, ref2) same: a mapping registers, refs set scope policies

Development

uv sync
uv run ruff format . && uv run ruff check --fix . && uv run mypy && uv run pytest

Release files for dryv-author 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dryv-author 0.0.1
File Size Uploaded
dryv_author-0.0.1.tar.gz 59.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dryv-author 0.0.1
File Interpreter ABI Platform
dryv_author-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 97.8 kB

Release files / dryv_author-0.0.1.tar.gz

Download URL dryv_author-0.0.1.tar.gz
Size 59.7 kB
Tags Source
SHA-256 checksum
How to use checksums
404e218f8517871cae96746bb8644327aa5757615b10d71fc558777a25f7ffe9
BLAKE2b-256 checksum
How to use checksums
a02d483bf94e8190130990c7f5c721cd361eba0bedeef24bef74808b18a865ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / dryv_author-0.0.1-py3-none-any.whl

Download URL dryv_author-0.0.1-py3-none-any.whl
Size 38.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d67a7efec9ff0aabf8b9366ba2563567c5514170d2e94c2d30e12324f86f2fe0
BLAKE2b-256 checksum
How to use checksums
79a4cd014ebe5bf59fb3c811ec46f3603a1f0370745e6d0e195f5799d381c452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page