Notes tagged with "Poetry"

Poetry Uploads

Uploading Packages to PyPi With Poetry

Setting a pypi repository token:

  1. create a token on pypi. Create a specific token for each package.

  2. copy the token and put it somewhere safe.

  3. Save your token with poetry. Poetry will try to use keyring to store the token:

    poetry config pypi-token.dover-test

    poetry config pyi-token.pypi my-token

this is what poetry does

  1. fetches the repo url from your local config file (On Linux Mint this is located here: ~/.config/pypoetry/config.toml. )

Working With Poetry

Installing A Working Environment With An Existing Project

This always messes me up.

  1. Run poetry install. This will create a new virtual env and install all your dependencies in it.

    ... poetry install
    
  2. Now to use it properly, you need to be in the shell:

    ... poetry shell
    
  3. From here any application commands you have registered in your poetry pyproject.toml file should work:

    ... app-cmd --help
    

    In theory, you should be able to run this outside the shell: