Skip to main content

Generated Python SDK for the AuditHub API.

Project description

audithub-sdk

audithub-sdk is the generated Python SDK for the AuditHub API at https://audithub.dev.veridise.tools/api/v1. This repository is intended to be the core dependency used by other Python repos that need a typed client for interacting with AuditHub.

Generation

The client code in this repository is generated from the live OpenAPI document:

https://audithub.dev.veridise.tools/api/v1/openapi.json

The repository contents are produced with OpenAPI Generator 7.20.0. The current generated package version is 0.1.0.

The current generation command is:

openapi-generator generate \
  -i https://audithub.dev.veridise.tools/api/v1/openapi.json \
  -g python \
  -o . \
  --additional-properties=packageName=audithub_sdk,projectName=audithub-sdk,packageVersion=1.0.2,hideGenerationTimestamp=true,library=httpx

Regenerating

When the AuditHub API schema changes, regenerate the SDK from the repository root and pass the new SDK version:

scripts/regenerate-sdk.sh 0.1.1

The script passes that version as packageVersion to OpenAPI Generator, then syncs repository-maintained version references in:

  • pyproject.toml
  • setup.py
  • README.md
  • AGENTS.md

The version in this README's generator command is intentionally updated only when regenerating the SDK.

Manual changes in this repo should stay limited to repository-specific files such as:

  • README.md
  • packaging metadata
  • CI workflows
  • scripts/regenerate-sdk.sh

Generated source, models, docs, and tests should be replaced by regeneration rather than edited by hand.

Version Bumping

bump-my-version is configured in pyproject.toml for release-only version bumps. For API schema changes, use scripts/regenerate-sdk.sh VERSION instead. The bump command updates package metadata and runtime package-version strings, commits the change, and creates a vX.Y.Z tag:

uv tool install bump-my-version
bump-my-version bump patch

To set an exact version:

bump-my-version bump --new-version 0.1.1

The bump configuration intentionally does not update this README's generator command. That command is updated by scripts/regenerate-sdk.sh when the SDK is regenerated.

Installation

From PyPI:

pip install audithub-sdk

From the repository:

pip install .

Usage

import audithub_sdk

configuration = audithub_sdk.Configuration(
    host="https://audithub.dev.veridise.tools/api/v1"
)

async with audithub_sdk.ApiClient(configuration) as api_client:
    api = audithub_sdk.AdminApi(api_client)
    print(await api.about_admin_about_get())

For OIDC client-credentials authentication, use the handwritten extension package:

import audithub_sdk
from audithub_sdk_ext import AuthenticatedApiClient, OIDCClientCredentialsContext

configuration = audithub_sdk.Configuration(
    host="https://audithub.dev.veridise.tools/api/v1"
)
auth_context = OIDCClientCredentialsContext(
    oidc_configuration_url="https://issuer.example/.well-known/openid-configuration",
    client_id="your-client-id",
    client_secret="your-client-secret",
)

async with AuthenticatedApiClient(configuration, auth_context=auth_context) as api_client:
    api = audithub_sdk.AdminApi(api_client)
    print(await api.about_admin_about_get())

Testing

Install dependencies and run the generated test suite:

python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pytest --cov=audithub_sdk

Publishing

The repository includes pyproject.toml and setup.py so the package can be built and published to PyPI with standard Python packaging tools.

To build distributions locally:

python -m build

Publishing is handled by .github/workflows/publish.yml from a GitHub release tag. The workflow does not edit version files; it fails unless the tag version matches:

  • pyproject.toml
  • setup.py
  • audithub_sdk/__init__.py

Use vX.Y.Z tags for releases, for example:

git tag v0.1.1
git push origin v0.1.1

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

audithub_sdk-1.0.2.tar.gz (169.1 kB view details)

Uploaded Source

Built Distribution

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

audithub_sdk-1.0.2-py3-none-any.whl (368.5 kB view details)

Uploaded Python 3

File details

Details for the file audithub_sdk-1.0.2.tar.gz.

File metadata

  • Download URL: audithub_sdk-1.0.2.tar.gz
  • Upload date:
  • Size: 169.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for audithub_sdk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6f329e491418b091031b5c9b4413d7210ae1fdac47ae3637b3684267639411de
MD5 6750b2be96149a131c5d51af9045b79f
BLAKE2b-256 528217918202c9875ae77334c5ecc9b50b5b0715e363b47fa7627351e80ad725

See more details on using hashes here.

Provenance

The following attestation bundles were made for audithub_sdk-1.0.2.tar.gz:

Publisher: publish.yml on Veridise/audithub-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file audithub_sdk-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: audithub_sdk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 368.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for audithub_sdk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea3f04045b7d49c9746d5fca345409c9a1871a405d8d31405d0e2ded8ff8be23
MD5 f568424c7a36fbf7a5ffa62e16b83f78
BLAKE2b-256 16c0a6572ab78bdcc515ee2b3f64fcfc1054c2893b263303be62859cad07f46c

See more details on using hashes here.

Provenance

The following attestation bundles were made for audithub_sdk-1.0.2-py3-none-any.whl:

Publisher: publish.yml on Veridise/audithub-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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