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.5.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file gundi_client_v2-2.3.5.tar.gz
.
File metadata
- Download URL: gundi_client_v2-2.3.5.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.28.1 setuptools/66.1.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b92810725e4c99931cfe94124b72d0fc610d976985afbde31774cee49c102e69 |
|
MD5 | 28271806a66b051f14c77abf28a794de |
|
BLAKE2b-256 | 3d6e4b11b40af664f5654553018a135aef5a328489fc7f2820e9bf92bb88dfb4 |
Provenance
File details
Details for the file gundi_client_v2-2.3.5-py3-none-any.whl
.
File metadata
- Download URL: gundi_client_v2-2.3.5-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.28.1 setuptools/66.1.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a2c676f93e0455022f7fb96b35f80edc595ddf54c76b06588475daea101d862 |
|
MD5 | 1679dbc4b9883a2040154aee56769aa7 |
|
BLAKE2b-256 | b790708ec96abb1011cf5c5c936e8aa540fd7bbe5b6fd3b3e8df53f704fd7f44 |