Support Python inline script metadata #5627
Answered
by
br3ndonland
br3ndonland
asked this question in
Questions
|
When running Python scripts on Windmill, users don't necessarily need a requirements file. They can just import packages in their scripts and Windmill will fetch the dependencies from PyPI. If users need specific versions of Python or dependencies, they can pin the versions inline as shown in the Windmill docs: # py313
# requirements:
# polars[numpy]>=1,<2
import numpy as np
import polars as pl
def numpy_version() -> str:
return np.__version__
def polars_version() -> str:
return pl.__version__This is a nice feature, but the syntax that Windmill uses does not work with other tools. Python already has a standard for inline script metadata that is supported by other tools like uv scripts. It would be great if Windmill also supported the Python inline script metadata standard. The example above would look like this with inline script metadata: # /// script
# requires-python = ">=3.13"
# dependencies = [
# "polars[numpy]>=1,<2",
# ]
# ///
import numpy as np
import polars as pl
def numpy_version() -> str:
return np.__version__
def polars_version() -> str:
return pl.__version__ |
Answered by
br3ndonland
Jul 11, 2025
Replies: 1 comment 2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Released in v1.493.0.