Skip to main content

pipeline-analytics-sdk-python

CI PyPI Codecov License: MIT docs

A Python client for pipeline-analytics's REST API, generated from its OpenAPI spec with openapi-python-client. It saves you from hand-rolling HTTP requests, retries and pagination against the API yourself.

Requirements

  • Python 3.12 or later.
  • A running pipeline-analytics instance.
  • A session cookie for that instance (see "Authentication" below) — every endpoint except get_version and the two webhook receivers needs one.

Installation

pip install pipeline-analytics-sdk

Pin an exact version in your own pyproject.toml/requirements.txt rather than tracking the latest release in anything but a quick trial.

Authentication

pipeline-analytics authenticates browsers with WebAuthn, not an API token — there's no headless credential-grant flow in its spec (a token flow is a known gap on the server side), so this SDK can't log in for you. Get a session cookie by logging into the dashboard in a browser, opening dev tools, and copying the session cookie's value. Pass it to PipelineAnalyticsClient or set PIPELINE_ANALYTICS_SESSION in the environment:

import os
from pipeline_analytics import PipelineAnalyticsClient

client = PipelineAnalyticsClient(
    "https://pipeline-analytics.example.com",
    session_cookie=os.environ.get("PIPELINE_ANALYTICS_SESSION"),
)

A session cookie expires the same way it would in a browser; there's nothing in this SDK to refresh it automatically.

Usage

get_version needs no session and is a good first call to prove the client reaches the server at all:

from pipeline_analytics import PipelineAnalyticsClient

with PipelineAnalyticsClient("https://pipeline-analytics.example.com") as client:
    version = client.get_version()
    print("server version:", version.version)

Listing tracked repos needs a session, and demonstrates the pagination iterator and error handling:

import os
from pipeline_analytics import APIError, PipelineAnalyticsClient, iter_repos

client = PipelineAnalyticsClient(
    "https://pipeline-analytics.example.com",
    session_cookie=os.environ.get("PIPELINE_ANALYTICS_SESSION"),
)

try:
    for repo in iter_repos(client.raw):
        print(repo.identifier, repo.ingestion_status)
except APIError as e:
    if e.status_code == 401:
        raise SystemExit("session cookie expired or invalid") from e
    raise

An async equivalent, aiter_repos, is available for async/await code.

Every other operation follows the generated client's pattern — pipeline_analytics._generated.api.<tag>.<operation>.sync_detailed(client=client.raw, ...) (or asyncio_detailed for async) returns a typed Response whose .parsed field holds the decoded body for a documented status code. Use decode_error to turn any error response into a pipeline_analytics.APIError uniformly:

from pipeline_analytics import decode_error
from pipeline_analytics._generated.api.repos import get_repo_usage

response = get_repo_usage.sync_detailed(client=client.raw, repo_id=repo_id)
if error := decode_error(response):
    raise error
usage = response.parsed

The client retries a 429 or 5xx response with exponential backoff and jitter (honoring a server-sent Retry-After), and never retries any other 4xx. Tune it by passing a pipeline_analytics.RetryConfig as retry=, or swap the underlying httpx.Client/httpx.AsyncClient entirely with httpx_client=/httpx_async_client=.

Reports

The last green run on main publishes its test and coverage reports at apis.ryankes.eu/pipeline-analytics-sdk-python/reports/: JUnit XML under tests/, and an HTML report plus Cobertura coverage.xml under coverage/. A red test run publishes nothing.

Regenerating the client

See CONTRIBUTING.md — the generated code is pinned to a specific pipeline-analytics commit and shouldn't drift from it silently.

Contributing

See CONTRIBUTING.md for building, testing and the release process.

License

MIT — a permissive license for the client, independent of pipeline-analytics' own AGPL-3.0.

Metadata

Release files for pipeline-analytics-sdk 3.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipeline-analytics-sdk 3.0.7
File Size Uploaded
pipeline_analytics_sdk-3.0.7.tar.gz 239.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipeline-analytics-sdk 3.0.7
File Interpreter ABI Platform
pipeline_analytics_sdk-3.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 390.3 kB

Release files / pipeline_analytics_sdk-3.0.7.tar.gz

Download URL pipeline_analytics_sdk-3.0.7.tar.gz
Size 239.3 kB
Tags Source
SHA-256 checksum
How to use checksums
592dde270119a0d85f1ebc6fe812b89c8f4d3477e291b5adef5820608ea1c008
BLAKE2b-256 checksum
How to use checksums
452c5ecac246bc9322ba9e7cce210af2978e0aa7a1ba7bd512a7cf534b16ad26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / pipeline_analytics_sdk-3.0.7-py3-none-any.whl

Download URL pipeline_analytics_sdk-3.0.7-py3-none-any.whl
Size 151.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07aa70b37fde448770ca399f196c3ddf038d5cf3fcd7f2215caae03db6d14b23
BLAKE2b-256 checksum
How to use checksums
81acd39f0bf62b1572cf20c319d825784598188cb4a541af3657ffff3cc4c6a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

3.0.12

2 release files

3.0.11

2 release files

3.0.10

2 release files

3.0.9

2 release files

3.0.8

2 release files

This release

3.0.7 This release

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page