Skip to main content

Async helpers that wrap Argo CD, Git providers, and Vault APIs.

Project description

infra-connectors

infra-connectors bundles asynchronous helpers that wrap the HTTP APIs exposed by Argo CD, Git providers that implement the GitHub API, and HashiCorp Vault. The utilities were extracted from the Backstage provisioning service so other projects can reuse the same integration layer.

Features

  • Async clients that validate responses and raise typed exceptions.
  • High-level helpers for synchronising Argo CD applications, manipulating Git repository contents, and managing Vault secrets.
  • Shared logging configuration built on Loguru for consistent observability across services.
  • Minimal dependency footprint so the utilities stay framework agnostic.

Installation

pip install horizon-infra-connectors

Usage

from horizon_infra_connectors import ArgoCD, Git, Vault

argo = ArgoCD(
    base_url="https://argo.example.com",
    api_key="token",
    application_set_timeout=30,
)

git = Git(
    base_url="https://api.github.com/repos/org/repo",
    token="token",
)

vault = Vault(
    base_url="https://vault.example.com",
    token="token",
)

Each service exposes an underlying API client when you need lower-level control:

import asyncio
from horizon_infra_connectors.argocd import ArgoCDAPI

async def main() -> None:
    api = ArgoCDAPI(base_url="https://argo.example.com", api_key="token")
    app = await api.get_application("example")
    print(app["metadata"]["name"])

asyncio.run(main())

The package raises rich exceptions that inherit from infra_connectors.errors.ExternalServiceError, making it simple to map failures to HTTP responses or retry logic.

See the module docstrings for additional usage examples.

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

horizon_infra_connectors-0.0.0.0.dev1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file horizon_infra_connectors-0.0.0.0.dev1.tar.gz.

File metadata

File hashes

Hashes for horizon_infra_connectors-0.0.0.0.dev1.tar.gz
Algorithm Hash digest
SHA256 3c5d63f3440b904b2dbb69d5eeecdf833b70544f822b2a3a78cc56ece4f24d56
MD5 8c010ef47965e015ba64e30b04912147
BLAKE2b-256 5bb60f52a6e50d7b0258e6ff8132bc76d6d18c264c2472535eca81765e291bc3

See more details on using hashes here.

File details

Details for the file horizon_infra_connectors-0.0.0.0.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for horizon_infra_connectors-0.0.0.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d04c2e8dcba043035695c3e1570fd32edd2496b9ac369cd91c24097e2fab79c
MD5 4ea3ea84f3ee64e64aa7adf28e886579
BLAKE2b-256 628e2d5e47b5977b7a00155bfc31aea6cba6828af446ef9dc2ac1fe4c654931b

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