@@ -224,7 +224,8 @@ $ trustify-da-javascript-client license /path/to/package.json
224224< li><a href=" https://www.javascript.com/" > JavaScript< /a> - < a href=" https://pnpm.io/" > pnpm< /a></li>
225225< li><a href=" https://www.javascript.com/" > JavaScript< /a> - < a href=" https://classic.yarnpkg.com/" > Yarn Classic< /a> / < a href=" https://yarnpkg.com/" > Yarn Berry< /a></li>
226226< li><a href=" https://go.dev/" > Golang< /a> - < a href=" https://go.dev/blog/using-go-modules/" > Go Modules< /a></li>
227- < li><a href=" https://www.python.org/" > Python< /a> - < a href=" https://pypi.org/project/pip/" > pip Installer< /a></li>
227+ < li><a href=" https://www.python.org/" > Python< /a> - < a href=" https://pypi.org/project/pip/" > pip Installer< /a> (< code> requirements.txt< /code> )< /li>
228+ < li><a href=" https://www.python.org/" > Python< /a> - < a href=" https://python-poetry.org/" > Poetry< /a> / < a href=" https://docs.astral.sh/uv/" > uv< /a> (< code> pyproject.toml< /code> )< /li>
228229< li><a href=" https://gradle.org/" > Gradle (Groovy and Kotlin DSL)< /a> - < a href=" https://gradle.org/install/" > Gradle Installation< /a></li>
229230< li><a href=" https://www.rust-lang.org/" > Rust< /a> - < a href=" https://doc.rust-lang.org/cargo/" > Cargo< /a></li>
230231< /ul>
@@ -379,7 +380,30 @@ version = "1.10"
379380log = "0.4" # trustify-da-ignore
380381```
381382
382- All of the 6 above examples are valid for marking a package to be ignored
383+
384+ <em>Python pyproject.toml</em> users can add a comment with <code>#exhortignore</code> (or <code># trustify-da-ignore</code>) next to the dependency in <code>pyproject.toml</code>.
385+
386+ PEP 621 style (<code>[project]</code> dependencies):
387+ ```toml
388+ [project]
389+ dependencies = [
390+ "flask>=2.0.3",
391+ "requests>=2.25.1",
392+ "uvicorn>=0.17.0", #exhortignore
393+ "click>=8.0.4", # trustify-da-ignore
394+ ]
395+ ```
396+
397+ Poetry style (<code>[tool.poetry.dependencies]</code>):
398+ ```toml
399+ [tool.poetry.dependencies]
400+ flask = "^2.0.3"
401+ requests = "^2.25.1"
402+ uvicorn = "^0.17.0" #exhortignore
403+ click = "^8.0.4" # trustify-da-ignore
404+ ```
405+
406+ All of the above examples are valid for marking a package to be ignored
383407</li>
384408
385409</ul>
@@ -410,6 +434,8 @@ let options = {
410434 ' TRUSTIFY_DA_PIP3_PATH' : ' /path/to/pip3' ,
411435 ' TRUSTIFY_DA_PYTHON_PATH' : ' /path/to/python' ,
412436 ' TRUSTIFY_DA_PIP_PATH' : ' /path/to/pip' ,
437+ ' TRUSTIFY_DA_UV_PATH' : ' /path/to/uv' ,
438+ ' TRUSTIFY_DA_POETRY_PATH' : ' /path/to/poetry' ,
413439 ' TRUSTIFY_DA_GRADLE_PATH' : ' /path/to/gradle' ,
414440 ' TRUSTIFY_DA_CARGO_PATH' : ' /path/to/cargo' ,
415441 // Workspace root for monorepos (Cargo, npm/pnpm/yarn); lock file expected here
@@ -556,6 +582,16 @@ following keys for setting custom paths for the said executables.
556582< td> TRUSTIFY_DA_CARGO_PATH< /td>
557583< /tr>
558584< tr>
585+ < td><a href=" https://docs.astral.sh/uv/" > uv< /a></td>
586+ < td><em> uv< /em></td>
587+ < td> TRUSTIFY_DA_UV_PATH< /td>
588+ < /tr>
589+ < tr>
590+ < td><a href=" https://python-poetry.org/" > Poetry< /a></td>
591+ < td><em> poetry< /em></td>
592+ < td> TRUSTIFY_DA_POETRY_PATH< /td>
593+ < /tr>
594+ < tr>
559595< td> Workspace root (monorepos)< /td>
560596< td> —< /td>
561597< td> workspaceDir / TRUSTIFY_DA_WORKSPACE_DIR< /td>
@@ -608,6 +644,24 @@ TRUSTIFY_DA_GO_MVS_LOGIC_ENABLED=false
608644
609645#### Python Support
610646
647+ The client supports two Python manifest formats:
648+
649+ - **`requirements.txt`** — uses pip/pip3 to resolve dependencies
650+ - **`pyproject.toml`** — uses [uv](https://docs.astral.sh/uv/) or [Poetry](https://python-poetry.org/) to resolve dependencies
651+
652+ ##### pyproject.toml
653+
654+ For `pyproject.toml` projects, the client detects which tool manages the project by checking for lock files:
655+ - If `poetry.lock` is present and `[tool.poetry]` is defined, **Poetry** is used (`poetry show --tree` and `poetry show --all`)
656+ - If `uv.lock` is present, **uv** is used (`uv export --format requirements.txt --frozen --no-hashes`)
657+ - If neither lock file is found, an error is thrown
658+
659+ Both PEP 621 (`[project]` dependencies) and Poetry-style (`[tool.poetry.dependencies]`) are supported.
660+
661+ Custom executable paths can be set via `TRUSTIFY_DA_UV_PATH` and `TRUSTIFY_DA_POETRY_PATH`.
662+
663+ ##### requirements.txt
664+
611665By default, For python support, the api assumes that the package is installed using the pip/pip3 binary on the system PATH, or using the customized
612666Binaries passed to environment variables. In any case, If the package is not installed , then an error will be thrown.
613667
0 commit comments