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.bitbucket.org/2.0",
token="token",
username_or_email="kingjohnny@example.com or kingJohnny",
workspace="workspace",
repo_slug="repo",
)
vault = Vault(
base_url="https://vault.example.com",
token="token",
)
Bitbucket is the default Git provider. To target GitHub instead, supply the provider argument:
from horizon_infra_connectors import Git
github = Git(
base_url="https://api.github.com/repos/org/repo",
token="github-token",
provider="github",
)
GitHub usage example
import asyncio
from horizon_infra_connectors import Git
async def main() -> None:
github = Git(
base_url="https://api.github.com/repos/org/repo",
token="github-token",
provider="github",
)
await github.async_init()
readme_text = await github.get_file_content("README.md")
print(readme_text.splitlines()[0])
asyncio.run(main())
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.1.dev1.tar.gz.
File metadata
- Download URL: horizon_infra_connectors-0.0.0.1.dev1.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ea5949adbf5d297ebf2373e1cf8a4b89a1d8ef376f6800556d9f956206aa46
|
|
| MD5 |
bd6169f9ac75408bb879eb45bcb5c3b3
|
|
| BLAKE2b-256 |
eb8d354d21b10be5cb9b26c3a0355c4e3aba9ee31565d894e78977d11757dd8d
|
Provenance
The following attestation bundles were made for horizon_infra_connectors-0.0.0.1.dev1.tar.gz:
Publisher:
python-publish.yml on SavageAxe/infra-connectors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
horizon_infra_connectors-0.0.0.1.dev1.tar.gz -
Subject digest:
e2ea5949adbf5d297ebf2373e1cf8a4b89a1d8ef376f6800556d9f956206aa46 - Sigstore transparency entry: 592806148
- Sigstore integration time:
-
Permalink:
SavageAxe/infra-connectors@df6e9a84bac6d464bd1bbc5b93e3088d33ca984e -
Branch / Tag:
refs/tags/0.0.0.1.dev1 - Owner: https://github.com/SavageAxe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@df6e9a84bac6d464bd1bbc5b93e3088d33ca984e -
Trigger Event:
release
-
Statement type:
File details
Details for the file horizon_infra_connectors-0.0.0.1.dev1-py3-none-any.whl.
File metadata
- Download URL: horizon_infra_connectors-0.0.0.1.dev1-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73f0140300ea68fd78970ba46f3df874b2cb6824df5030304180ebc0ad050135
|
|
| MD5 |
f440064d6bacd75c3969ed89227e819d
|
|
| BLAKE2b-256 |
a7cf7bc980364d99cccf154efbbdc5ee059a61a46272ac1b4400eca4cf22df94
|
Provenance
The following attestation bundles were made for horizon_infra_connectors-0.0.0.1.dev1-py3-none-any.whl:
Publisher:
python-publish.yml on SavageAxe/infra-connectors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
horizon_infra_connectors-0.0.0.1.dev1-py3-none-any.whl -
Subject digest:
73f0140300ea68fd78970ba46f3df874b2cb6824df5030304180ebc0ad050135 - Sigstore transparency entry: 592806260
- Sigstore integration time:
-
Permalink:
SavageAxe/infra-connectors@df6e9a84bac6d464bd1bbc5b93e3088d33ca984e -
Branch / Tag:
refs/tags/0.0.0.1.dev1 - Owner: https://github.com/SavageAxe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@df6e9a84bac6d464bd1bbc5b93e3088d33ca984e -
Trigger Event:
release
-
Statement type: