Support Python inline script metadata #5627
-
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__ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's planned, cc @pyranota :) |
Beta Was this translation helpful? Give feedback.
Released in v1.493.0.