HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

poetry run — Run a command in the project's virtual environment. More information: <https://python-poetry.org/doc

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thevirtualcommandrunpoetry runcliproject

Problem

How to use the poetry run command: Run a command in the project's virtual environment. More information: <https://python-poetry.org/docs/cli/#run>.

Solution

poetry run — Run a command in the project's virtual environment. More information: <https://python-poetry.org/docs/cli/#run>.

Run a command inside the virtual environment:
poetry run {{command}}


Run a command with arguments:
poetry run {{command}} {{argument1 argument2 ...}}


Run a script defined in pyproject.toml:
poetry run {{script_name}}


Run a Python script:
poetry run python {{path/to/script.py}}

Code Snippets

Run a command inside the virtual environment

poetry run {{command}}

Run a command with arguments

poetry run {{command}} {{argument1 argument2 ...}}

Run a script defined in `pyproject.toml`

poetry run {{script_name}}

Run a Python script

poetry run python {{path/to/script.py}}

Context

tldr-pages: common/poetry run

Revisions (0)

No revisions yet.