Configuration Poetry can be configured via the config command (see more about its usage here) or directly in the config.toml file that will be automatically created when you first run that command. This file can typically be found in one of the following directories: macOS: ~/Library/Application Support/pypoetry Windows: %APPDATA%\pypoetry For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME. That means, by default ~/.config/pypoetry. Local configuration Poetry also provides the abil...| python-poetry.org
Managing dependencies Dependency groups Poetry provides a way to organize your dependencies by groups. For instance, you might have dependencies that are only needed to test your project or to build the documentation. To declare a new dependency group, use a tool.poetry.group. section where is the name of your dependency group (for instance, test): [tool.poetry.group.test] # This part can be left out [tool.poetry.group.test.dependencies] pytest = "^6.0.0" pytest-mock = "*" Note All dependenc...| python-poetry.org
Basic usage For the basic usage introduction we will be installing pendulum, a datetime library. If you have not yet installed Poetry, refer to the Introduction chapter. Project setup First, let’s create our new project, let’s call it poetry-demo: poetry new poetry-demo This will create the poetry-demo directory with the following content: poetry-demo ├── pyproject.toml ├── README.md ├── poetry_demo │ └── __init__.py └── tests └── __init__.py The pypr...| python-poetry.org