This guide provides step-by-step instructions to set up the project using Poetry, a dependency management tool for Python.
If you don't have Poetry installed, you can install it using the official installation script:
curl -sSL https://install.python-poetry.org | python3 -
Alternatively, if you are using Windows, run:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
After installation, verify that Poetry is installed:
poetry --version
Poetry requires a plugin to use poetry shell
. Install it with:
poetry self add poetry-plugin-shell
Navigate to the project directory and install dependencies:
poetry install
This will create a virtual environment (if not already created) and install all dependencies defined in pyproject.toml
.
To activate the Poetry-managed virtual environment, run:
poetry shell
To exit the virtual environment, simply type:
exit
Once inside the virtual environment, you can run the application as follows:
python demo.py