Skip to main content

Inofficial OWASP Dependency Track API Python client

Project description

PyPI version

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:

Development

Update the library

  1. Install the requirements: pip install -r requirements.txt
  2. Start a OWASP DT instance locally (like via. Docker-Compose): https://docs.dependencytrack.org/getting-started/deploy-docker/
  3. Run regenerate-api-client.sh
  4. Check if bug https://github.com/openapi-generators/openapi-python-client/issues/1256 is still in effect
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

owasp_dependency_track_client-4.13.7.tar.gz (118.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

owasp_dependency_track_client-4.13.7-py3-none-any.whl (408.7 kB view details)

Uploaded Python 3

File details

Details for the file owasp_dependency_track_client-4.13.7.tar.gz.

File metadata

File hashes

Hashes for owasp_dependency_track_client-4.13.7.tar.gz
Algorithm Hash digest
SHA256 ebda317d53ae684cce3401b73f78fa180a1e990395318edcfd58d07c1105fdd5
MD5 060088b89bf2617c51f7f2d7bbaad5bf
BLAKE2b-256 772c6905bab8770556ccc6b2e4effadb63fdfc4a4fbb7447fdb7ad54a5fc65e5

See more details on using hashes here.

File details

Details for the file owasp_dependency_track_client-4.13.7-py3-none-any.whl.

File metadata

File hashes

Hashes for owasp_dependency_track_client-4.13.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5763e438bd18e4b872a2cc35b492dbf943d167bd21e8e070d26378ca4f4ba623
MD5 f2a47552bc3fc94cd0b949e75493083c
BLAKE2b-256 ca290aab22cbbd0ccee519da0b486a01d3874aa0584c0a40f7b364ad4685a492

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page