mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-03 16:55:13 +00:00
Update cheatsheets
This commit is contained in:
26
tldr/pip-lock
Normal file
26
tldr/pip-lock
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pip lock
|
||||
|
||||
> Lock Python packages and their dependencies into a reproducible file.
|
||||
> Experimental feature of `pip`.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_lock/>.
|
||||
|
||||
- Generate a `pylock.toml` for the current project:
|
||||
|
||||
`pip lock {{[-e|--editable]}} .`
|
||||
|
||||
- Lock dependencies from a requirements file:
|
||||
|
||||
`pip lock {{[-r|--requirement]}} {{path/to/requirements.txt}}`
|
||||
|
||||
- Specify a custom output file for the lock:
|
||||
|
||||
`pip lock {{[-o|--output]}} {{path/to/lockfile.toml}}`
|
||||
|
||||
- Lock a specific package and its dependencies:
|
||||
|
||||
`pip lock {{package}}`
|
||||
Reference in New Issue
Block a user