diff --git a/pages/common/poetry-new.md b/pages/common/poetry-new.md new file mode 100644 index 0000000000..4a3981395b --- /dev/null +++ b/pages/common/poetry-new.md @@ -0,0 +1,28 @@ +# poetry new + +> Create a new Poetry project in a specific directory. +> More information: . + +- Create a new project (defaults to `src` layout): + +`poetry new {{path/to/directory}}` + +- Create a new project asking for configuration details interactively: + +`poetry new {{path/to/directory}} {{[-i|--interactive]}}` + +- Create a new project with a specific package name: + +`poetry new {{path/to/directory}} --name {{package_name}}` + +- Create a new project using the flat layout (without the `src` directory): + +`poetry new {{path/to/directory}} --flat` + +- Create a new project with a specific author: + +`poetry new {{path/to/directory}} --author "{{Name }}"` + +- Create a new project with a specific README format: + +`poetry new {{path/to/directory}} --readme {{md|rst|txt|...}}` diff --git a/pages/common/poetry-publish.md b/pages/common/poetry-publish.md new file mode 100644 index 0000000000..af8c230a33 --- /dev/null +++ b/pages/common/poetry-publish.md @@ -0,0 +1,28 @@ +# poetry publish + +> Publishes a package to a remote repository. +> More information: . + +- Publish the current package to PyPI: + +`poetry publish` + +- Build the package before publishing: + +`poetry publish --build` + +- Publish to a specific repository: + +`poetry publish {{[-r|--repository]}} {{repository_name}}` + +- Publish with specific credentials: + +`poetry publish {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}}` + +- Perform a dry run to see what would be done without actually publishing: + +`poetry publish --dry-run` + +- Skip files that already exist in the repository: + +`poetry publish --skip-existing` diff --git a/pages/common/poetry-remove.md b/pages/common/poetry-remove.md new file mode 100644 index 0000000000..b209e29f3b --- /dev/null +++ b/pages/common/poetry-remove.md @@ -0,0 +1,24 @@ +# poetry remove + +> Remove a package from the project dependencies. +> More information: . + +- Remove one or more packages from the project's dependencies: + +`poetry remove {{package1 package2 ...}}` + +- Remove a package from the development dependencies: + +`poetry remove {{package}} {{[-D|--dev]}}` + +- Remove a package from a specific dependency group: + +`poetry remove {{package}} {{[-G|--group]}} {{group_name}}` + +- Remove a package without making any changes (dry-run): + +`poetry remove {{package}} --dry-run` + +- Update the lock file only, without removing the package from the environment: + +`poetry remove {{package}} --lock` diff --git a/pages/common/poetry-run.md b/pages/common/poetry-run.md new file mode 100644 index 0000000000..8a9acc3251 --- /dev/null +++ b/pages/common/poetry-run.md @@ -0,0 +1,20 @@ +# poetry run + +> Run a command in the project's virtual environment. +> More information: . + +- Run a command inside the virtual environment: + +`poetry run {{command}}` + +- Run a command with arguments: + +`poetry run {{command}} {{argument1 argument2 ...}}` + +- Run a script defined in `pyproject.toml`: + +`poetry run {{script_name}}` + +- Run a Python script: + +`poetry run python {{path/to/script.py}}` diff --git a/pages/common/poetry-update.md b/pages/common/poetry-update.md new file mode 100644 index 0000000000..943f35525f --- /dev/null +++ b/pages/common/poetry-update.md @@ -0,0 +1,28 @@ +# poetry update + +> Update the dependencies as according to the `pyproject.toml` file. +> More information: . + +- Update all dependencies: + +`poetry update` + +- Update one or more specific packages: + +`poetry update {{package1 package2 ...}}` + +- Update the lock file only, without installing the packages: + +`poetry update --lock` + +- Synchronize the environment with the locked packages: + +`poetry update --sync` + +- Update dependencies only for a specific group: + +`poetry update --only {{group_name}}` + +- Simulate the update process without making changes: + +`poetry update --dry-run`