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.4.0.tar.gz
(4.2 kB
view details)
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 gundi_client_v2-2.4.0.tar.gz.
File metadata
- Download URL: gundi_client_v2-2.4.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70c5da69afcadf6fccf7fd1c650f63782bbfe674932cbd6eaaa73dd8a29e6af8
|
|
| MD5 |
ff496e8efccf5233313da9278d76eff8
|
|
| BLAKE2b-256 |
57464c12428cedb4f51e0ada0be3bd6a57c39d93b9f0cb558e6f8e707c99f56c
|
File details
Details for the file gundi_client_v2-2.4.0-py3-none-any.whl.
File metadata
- Download URL: gundi_client_v2-2.4.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7050837e3f9f841a922d7ea6905bcebd2274628c583dbbd7f7f3a0bb61495e1
|
|
| MD5 |
e94202a02b7c0700023c6d8dd5010e2b
|
|
| BLAKE2b-256 |
628ca78f9128fb3e912e13dc2347e95cd15ea808eb56b127b3a915550bd3ed2f
|