-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Basic ```poetry``` usage | ||
|
||
This short tutorial is a summary of the official ``poetry`` | ||
documentation. For more information, see the | ||
[official documentation](https://python-poetry.org/docs/basic-usage/). | ||
|
||
## Adding a dependency | ||
|
||
When you want to add a new dependency to the project, you can run the | ||
following command: | ||
|
||
```bash | ||
poetry add <DEPENDENCY> | ||
``` | ||
|
||
Where `<DEPENDENCY>` is the name of the dependency you want to add. | ||
|
||
In case you want to add a development dependency, you can run the following | ||
|
||
```bash | ||
poetry add --dev <DEPENDENCY> | ||
``` | ||
|
||
## Installing dependencies | ||
|
||
To install the dependencies of the project, you can run the following command: | ||
|
||
```bash | ||
poetry install | ||
``` | ||
|
||
## Activating the virtual environment | ||
|
||
To activate the virtual environment, you can run the following command: | ||
|
||
```bash | ||
poetry shell | ||
``` | ||
|
||
## Running a script | ||
|
||
To run a script, you can use the following command: | ||
|
||
```bash | ||
poetry run <SCRIPT> | ||
``` | ||
|
||
Where `<SCRIPT>` is the name of the script you want to run. |