An async client for Gundi's API
Project description
Gundi Client
Introduction
Gundi, a.k.a "The Portal" is a platform to manage integrations. The gundi-client is an async python client to interact with Gundi's REST API.
Installation
pip install gundi-client-v2
Usage
from gundi_client_v2 import GundiClient
import httpx
# You can use it as an async context-managed client
async with GundiClient() as client:
try:
connection = await client.get_connection_details(
integration_id="some-integration-uuid"
)
except httpx.RequestError as e:
logger.exception("Request Error")
...
except httpx.TimeoutException as e:
logger.exception("Request timed out")
...
except httpx.HTTPStatusError as e:
logger.exception("Response returned error")
else:
for integration in connection.destinations:
...
...
# Or create an instance and close the client explicitly later
client = GundiClient()
try:
response = await client.get_connection_details(
integration_id="some-integration-uuid"
)
except httpx.RequestError as e:
logger.exception("Request Error")
...
except httpx.TimeoutException as e:
logger.exception("Request timed out")
...
except httpx.HTTPStatusError as e:
logger.exception("Response returned error")
else:
for integration in connection.destinations:
...
...
await client.close() # Close the session used to send requests to Gundi
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
gundi_client_v2-2.3.2.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file gundi_client_v2-2.3.2.tar.gz
.
File metadata
- Download URL: gundi_client_v2-2.3.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a29c88b93edabb81ce2b8f33991c84cf690e56b2ecc66ffd229bc5734160c7 |
|
MD5 | 0bf4d0e3691df5239d08cc84c79e75ef |
|
BLAKE2b-256 | ec8d094289eebf15de9b8fe351ef42dd70d47bb931a68a8a36c83cf47e3d1617 |
Provenance
File details
Details for the file gundi_client_v2-2.3.2-py3-none-any.whl
.
File metadata
- Download URL: gundi_client_v2-2.3.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcb59900bb374c3cce17dca6893de1875afc57a709e7971c77ded29a64f9c4b7 |
|
MD5 | 81aeeecd00a2fc81556fa830f8b3cf8b |
|
BLAKE2b-256 | 19edc1c5f5085824077c5b0adc774c108ee1c29fdfd26e1c14dbe3b5c99d2831 |