diff --git a/sites/platform/src/languages/python/dependencies.md b/sites/platform/src/languages/python/dependencies.md index 1a61c2e643..e5123212e8 100644 --- a/sites/platform/src/languages/python/dependencies.md +++ b/sites/platform/src/languages/python/dependencies.md @@ -141,6 +141,20 @@ hooks: ``` {{< /codetabs >}} +## UV + +[uv](https://docs.astral.sh/uv/) is an extremely fast Python package and project +manager, written in Rust. + +```yaml {configFile="app"} +{{< snippet name="myapp" config="app" root="myapp" >}} +type: 'python:{{% latest "python" %}}' +dependencies: + python3: + uv: "*" +{{< /snippet >}} +``` + ## Poetry [Poetry](https://python-poetry.org/docs/) is a tool for dependency management and packaging in Python. diff --git a/sites/upsun/src/languages/python/dependencies.md b/sites/upsun/src/languages/python/dependencies.md index 6b703aa783..9400b374cf 100644 --- a/sites/upsun/src/languages/python/dependencies.md +++ b/sites/upsun/src/languages/python/dependencies.md @@ -141,6 +141,21 @@ hooks: ``` {{< /codetabs >}} +## UV + +[uv](https://docs.astral.sh/uv/) is an extremely fast Python package and project +manager, written in Rust. + +```yaml {configFile="app"} +applications: + # The app's name, which must be unique within the project. + myapp: + type: 'python:{{% latest "python" %}}' + dependencies: + python3: + uv: "*" +``` + ## Poetry [Poetry](https://python-poetry.org/docs/) is a tool for dependency management and packaging in Python. @@ -183,22 +198,22 @@ applications: # The location of the application's code. source: root: "myapp" - type: 'python:{{% latest "python" %}}' - dependencies: - python3: - poetry: '*' - variables: - env: - POETRY_VIRTUALENVS_IN_PROJECT: true - POETRY_VIRTUALENVS_CREATE: true - hooks: - build: | - # Fail the build if any errors occur - set -eu - # Download the latest version of pip - python{{% latest "python" %}} -m pip install --upgrade pip - # Install dependencies - poetry install + type: 'python:{{% latest "python" %}}' + dependencies: + python3: + poetry: '*' + variables: + env: + POETRY_VIRTUALENVS_IN_PROJECT: true + POETRY_VIRTUALENVS_CREATE: true + hooks: + build: | + # Fail the build if any errors occur + set -eu + # Download the latest version of pip + python{{% latest "python" %}} -m pip install --upgrade pip + # Install dependencies + poetry install ``` <---> +++