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
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 horizon_infra_connectors-0.0.0.0.dev1.tar.gz.
File metadata
- Download URL: horizon_infra_connectors-0.0.0.0.dev1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c5d63f3440b904b2dbb69d5eeecdf833b70544f822b2a3a78cc56ece4f24d56
|
|
| MD5 |
8c010ef47965e015ba64e30b04912147
|
|
| BLAKE2b-256 |
5bb60f52a6e50d7b0258e6ff8132bc76d6d18c264c2472535eca81765e291bc3
|
File details
Details for the file horizon_infra_connectors-0.0.0.0.dev1-py3-none-any.whl.
File metadata
- Download URL: horizon_infra_connectors-0.0.0.0.dev1-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d04c2e8dcba043035695c3e1570fd32edd2496b9ac369cd91c24097e2fab79c
|
|
| MD5 |
4ea3ea84f3ee64e64aa7adf28e886579
|
|
| BLAKE2b-256 |
628e2d5e47b5977b7a00155bfc31aea6cba6828af446ef9dc2ac1fe4c654931b
|