Skip to content

python-sdk: add script modules (PEP 723) - #61

Draft
eunomie wants to merge 9 commits into
dagger:mainfrom
eunomie:script-modules-pep723
Draft

eunomie wants to merge 9 commits into
dagger:mainfrom
eunomie:script-modules-pep723

Conversation

@eunomie

@eunomie eunomie commented Oct 20, 2026

Copy link
Copy Markdown
Member

Adds a script init template that generates a module as a single PEP 723 main.py instead of pyproject.toml + src/.

  • main.py holds the # /// script block and the main object; sdk/ and clients/* stay beside it as path sources; the lock is main.py.lock.
  • Layout is detected from files; no command converts an existing module.
  • The build installs with uv sync --script --locked, keyed on the block, lock and path sources, so code edits keep the dependency layer.
  • Refused in script mode: use-uv = false, the global client, migration from dagger.json.

Explain-changes: https://gistpreview.github.io/?41405c7a3ff4474a5aa5f9302093607e

Checks run (v1.0.0-beta.18 engine): helpers/pyproject Go tests, SDK pytest, ruff, and the e2e checks script-init, script-call, script-client, generate-scope-init, generate-scope-existing, find-client-root, runtime-call, entrypoint-client-call, shared-entrypoint-build, sdk-test.

Not run here: engine-e2e (floor-check, below-floor-check) and the remaining e2e checks; CI covers them.

Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant