You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/export.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,8 @@ description: Exporting a lockfile to different formats
5
5
6
6
# Exporting a lockfile
7
7
8
-
uv can export a lockfile to different formats for integration with other tools and workflows. The `uv export` command supports multiple output formats, each suited to different use cases.
8
+
uv can export a lockfile to different formats for integration with other tools and workflows. The
9
+
`uv export` command supports multiple output formats, each suited to different use cases.
9
10
10
11
For more details on lockfiles and how they're created, see the
11
12
[project layout](../concepts/projects/layout.md) and
@@ -15,9 +16,12 @@ For more details on lockfiles and how they're created, see the
15
16
16
17
uv supports three export formats:
17
18
18
-
-`requirements.txt`: The traditional pip-compatible [requirements file format](https://pip.pypa.io/en/stable/reference/requirements-file-format/).
19
-
-`pylock.toml`: The standardized Python lockfile format defined in [PEP 751](https://peps.python.org/pep-0751/).
20
-
-`CycloneDX`: An industry-standard [Software Bill of Materials (SBOM)](https://cyclonedx.org/) format.
19
+
-`requirements.txt`: The traditional pip-compatible
The `requirements.txt` format is the most widely supported format for Python dependencies. It can be used with `pip` and other Python package managers.
46
+
The `requirements.txt` format is the most widely supported format for Python dependencies. It can be
47
+
used with `pip` and other Python package managers.
43
48
44
49
### Basic usage
45
50
46
51
```console
47
52
$ uv export --format requirements.txt
48
53
```
49
54
50
-
The generated `requirements.txt` file can then be installed via `uv pip install`, or with other tools like `pip`.
55
+
The generated `requirements.txt` file can then be installed via `uv pip install`, or with other
56
+
tools like `pip`.
51
57
52
58
!!! note
53
59
@@ -58,7 +64,8 @@ The generated `requirements.txt` file can then be installed via `uv pip install`
58
64
59
65
## `pylock.toml` format
60
66
61
-
[PEP 751](https://peps.python.org/pep-0751/) defines a TOML-based lockfile format for Python dependencies. uv can export your project's dependency lockfile to this format.
67
+
[PEP 751](https://peps.python.org/pep-0751/) defines a TOML-based lockfile format for Python
68
+
dependencies. uv can export your project's dependency lockfile to this format.
uv can export your project's dependency lockfile as a Software Bill of Materials (SBOM) in CycloneDX format. SBOMs provide a comprehensive inventory of all software components in your application, which is useful for security auditing, compliance, and supply chain transparency.
78
+
uv can export your project's dependency lockfile as a Software Bill of Materials (SBOM) in CycloneDX
79
+
format. SBOMs provide a comprehensive inventory of all software components in your application,
80
+
which is useful for security auditing, compliance, and supply chain transparency.
72
81
73
82
!!! important
74
83
75
84
Support for exporting to CycloneDX is in [preview](../concepts/preview.md), so may be subject to change.
76
85
77
86
### What is CycloneDX?
78
87
79
-
[CycloneDX](https://cyclonedx.org/) is an industry-standard format for creating Software Bill of Materials. CycloneDX is machine readable and widely supported by security scanning tools, vulnerability databases, and Software Composition Analysis (SCA) platforms.
88
+
[CycloneDX](https://cyclonedx.org/) is an industry-standard format for creating Software Bill of
89
+
Materials. CycloneDX is machine readable and widely supported by security scanning tools,
90
+
vulnerability databases, and Software Composition Analysis (SCA) platforms.
80
91
81
92
### Basic usage
82
93
@@ -86,11 +97,14 @@ To export your project's lockfile as a CycloneDX SBOM:
86
97
$ uv export --format cyclonedx1.5
87
98
```
88
99
89
-
This will generate a JSON-encoded CycloneDX v1.5 document containing your project and all of its dependencies.
100
+
This will generate a JSON-encoded CycloneDX v1.5 document containing your project and all of its
101
+
dependencies.
90
102
91
103
### SBOM Structure
92
104
93
-
The generated SBOM follows the [CycloneDX specification](https://cyclonedx.org/specification/overview/). uv also includes the following custom properties on components:
105
+
The generated SBOM follows the
106
+
[CycloneDX specification](https://cyclonedx.org/specification/overview/). uv also includes the
0 commit comments