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.1.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.1.tar.gz.
File metadata
- Download URL: gundi_client_v2-2.4.1.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 |
38d594817bb213ea553f8220fd7c67b3f7857a56d3368887c5f67e695c7cf7ce
|
|
| MD5 |
2d0777f6c77bd7f647f4fff5dfbd9182
|
|
| BLAKE2b-256 |
e58bb01ad5b48f266886bba47fa0d75781d8f4783336f2ff1ce88bd7cbedf220
|
File details
Details for the file gundi_client_v2-2.4.1-py3-none-any.whl.
File metadata
- Download URL: gundi_client_v2-2.4.1-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 |
f26966df06e40db5874ead4d74db6e8c8dfc64d7645f647502a2dfdc0fb50873
|
|
| MD5 |
ef8bb0d53bf2603674f3abe4823489f6
|
|
| BLAKE2b-256 |
5835bc464c4736cce8ce5538379988a37e8382ac8101d4229632f5be55cb11f8
|