Inofficial OWASP Dependency Track API Python client
Project description
OWASP Dependency Track Python API client
This is a generated library based on the official OWASP Dependency Track OpenAPI spec (/api/openapi.json) using openapi-python-client.
Usage
pip install owasp-dependency-track-client
Create the client
from owasp_dt import Client
client = Client(
base_url="http://localhost:8081/api",
headers={
"X-Api-Key": "YOUR API KEY"
},
verify_ssl=False,
)
Call endpoints:
from owasp_dt.api.project import get_projects
projects = get_projects.sync(client=client)
assert len(projects) > 0
More OWASP Dependency Track utils
This library is part of a wider OWASP Dependency Track tool chain:
- OWASP Dependency Track Python API client: https://github.com/mreiche/owasp-dependency-track-python-client
- OWASP Dependency Track CLI: https://github.com/mreiche/owasp-dependency-track-cli
- OWASP Dependency Track Azure DevOps Sync: https://github.com/mreiche/owasp-dependency-track-azure-devops
Development
Update the library
- Install the requirements:
pip install -r requirements.txt - Start a OWASP DT instance locally (like via. Docker-Compose): https://docs.dependencytrack.org/getting-started/deploy-docker/
- Run
regenerate-api-client.sh - Check if bug https://github.com/openapi-generators/openapi-python-client/issues/1256 is still in effect
- Publish this library with the API version tag
Start the test environment
cd test
podman|docker compose up
- Preconfigured user:
admin:admin2 - Preconfigured API key: see
test/test.env
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file owasp_dependency_track_client-4.13.7.tar.gz.
File metadata
- Download URL: owasp_dependency_track_client-4.13.7.tar.gz
- Upload date:
- Size: 118.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebda317d53ae684cce3401b73f78fa180a1e990395318edcfd58d07c1105fdd5
|
|
| MD5 |
060088b89bf2617c51f7f2d7bbaad5bf
|
|
| BLAKE2b-256 |
772c6905bab8770556ccc6b2e4effadb63fdfc4a4fbb7447fdb7ad54a5fc65e5
|
File details
Details for the file owasp_dependency_track_client-4.13.7-py3-none-any.whl.
File metadata
- Download URL: owasp_dependency_track_client-4.13.7-py3-none-any.whl
- Upload date:
- Size: 408.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5763e438bd18e4b872a2cc35b492dbf943d167bd21e8e070d26378ca4f4ba623
|
|
| MD5 |
f2a47552bc3fc94cd0b949e75493083c
|
|
| BLAKE2b-256 |
ca290aab22cbbd0ccee519da0b486a01d3874aa0584c0a40f7b364ad4685a492
|