From the course: Create an Open-Source Project in Python

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Adding dependencies

Adding dependencies

- [Instructor] Back to our command-line interface. It's time to add some dependencies to the project, using the Poetry Add command, followed by the library and its version that you want. For example, our project uses Click, a library to create pretty command line interfaces. There are many ways to specify what version of the library are required. If you are not sure about how, check the documentation of Poetry. Here we show some common examples. For example, with Click, we want the compatible update of Version 8.1.0. Once you run the command, the dependency is installed, and you can see it by using the Poetry Show command to see all the available packages that are installed. Now, to add development dependency, you simply add the --dev flag to Add command. For example, we want to add the latest version of Pytest to our development environment. We type "poetry add --dev pytest@latest." Now, if you have many dependencies,…

Contents