Create a new project:
poetry new <project-name>
Activating the virtual environment:
poetry shell
Check pip packages and update:
pip list
pip install --upgrade pip
Add packages dependencies with poetry:
poetry add click rich pytest requests-oauthlib
or
poetry add $(cat requirements.txt)
Add poetry point in pyproject.toml enable for cli:
[tool.poetry.scripts]
twittercli = "twitter_cli.cli:cli"
Install dependencies:
poetry install
After adding the poetry point in pyproject.toml, we can call our cli like this:
twittercli --help
poetry run pytest