@@ -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>
@@ -391,7 +392,30 @@ version = "1.10"
391392log = "0.4" # trustify-da-ignore
392393```
393394
394- All of the 6 above examples are valid for marking a package to be ignored
395+
396+ <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>.
397+
398+ PEP 621 style (<code>[project]</code> dependencies):
399+ ```toml
400+ [project]
401+ dependencies = [
402+ "flask>=2.0.3",
403+ "requests>=2.25.1",
404+ "uvicorn>=0.17.0", #exhortignore
405+ "click>=8.0.4", # trustify-da-ignore
406+ ]
407+ ```
408+
409+ Poetry style (<code>[tool.poetry.dependencies]</code>):
410+ ```toml
411+ [tool.poetry.dependencies]
412+ flask = "^2.0.3"
413+ requests = "^2.25.1"
414+ uvicorn = "^0.17.0" #exhortignore
415+ click = "^8.0.4" # trustify-da-ignore
416+ ```
417+
418+ All of the above examples are valid for marking a package to be ignored
395419</li>
396420</ul>
397421
@@ -421,6 +445,8 @@ let options = {
421445 ' TRUSTIFY_DA_PIP3_PATH' : ' /path/to/pip3' ,
422446 ' TRUSTIFY_DA_PYTHON_PATH' : ' /path/to/python' ,
423447 ' TRUSTIFY_DA_PIP_PATH' : ' /path/to/pip' ,
448+ ' TRUSTIFY_DA_UV_PATH' : ' /path/to/uv' ,
449+ ' TRUSTIFY_DA_POETRY_PATH' : ' /path/to/poetry' ,
424450 ' TRUSTIFY_DA_GRADLE_PATH' : ' /path/to/gradle' ,
425451 ' TRUSTIFY_DA_CARGO_PATH' : ' /path/to/cargo' ,
426452 // Workspace root for monorepos (Cargo, npm/pnpm/yarn); lock file expected here
@@ -567,6 +593,16 @@ following keys for setting custom paths for the said executables.
567593< td> TRUSTIFY_DA_CARGO_PATH< /td>
568594< /tr>
569595< tr>
596+ < td><a href=" https://docs.astral.sh/uv/" > uv< /a></td>
597+ < td><em> uv< /em></td>
598+ < td> TRUSTIFY_DA_UV_PATH< /td>
599+ < /tr>
600+ < tr>
601+ < td><a href=" https://python-poetry.org/" > Poetry< /a></td>
602+ < td><em> poetry< /em></td>
603+ < td> TRUSTIFY_DA_POETRY_PATH< /td>
604+ < /tr>
605+ < tr>
570606< td> Workspace root (monorepos)< /td>
571607< td> —< /td>
572608< td> workspaceDir / TRUSTIFY_DA_WORKSPACE_DIR< /td>
@@ -619,6 +655,24 @@ TRUSTIFY_DA_GO_MVS_LOGIC_ENABLED=false
619655
620656#### Python Support
621657
658+ The client supports two Python manifest formats:
659+
660+ - **`requirements.txt`** — uses pip/pip3 to resolve dependencies
661+ - **`pyproject.toml`** — uses [uv](https://docs.astral.sh/uv/) or [Poetry](https://python-poetry.org/) to resolve dependencies
662+
663+ ##### pyproject.toml
664+
665+ For `pyproject.toml` projects, the client detects which tool manages the project by checking for lock files:
666+ - If `poetry.lock` is present and `[tool.poetry]` is defined, **Poetry** is used (`poetry show --tree` and `poetry show --all`)
667+ - If `uv.lock` is present, **uv** is used (`uv export --format requirements.txt --frozen --no-hashes`)
668+ - If neither lock file is found, an error is thrown
669+
670+ Both PEP 621 (`[project]` dependencies) and Poetry-style (`[tool.poetry.dependencies]`) are supported.
671+
672+ Custom executable paths can be set via `TRUSTIFY_DA_UV_PATH` and `TRUSTIFY_DA_POETRY_PATH`.
673+
674+ ##### requirements.txt
675+
622676By 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
623677Binaries passed to environment variables. In any case, If the package is not installed , then an error will be thrown.
624678
0 commit comments