Python client for the Gumloop API
Project description
Gumloop Python Client
A Python client for the Gumloop API that makes it easy to run and monitor Gumloop flows.
Installation
pip install gumloop
Usage
from gumloop import GumloopClient
# Initialize the client
client = GumloopClient(
api_key="your_api_key",
user_id="your_user_id"
)
# Run a flow and wait for outputs
output = client.run_flow(
flow_id="your_flow_id",
inputs={
"recipient": "example@email.com",
"subject": "Hello",
"body": "World"
}
)
print(output)
Chat with an agent (streaming)
import asyncio
from gumloop import AsyncGumloop
async def main() -> None:
async with AsyncGumloop(access_token="your_access_token") as client:
agents = await client.agents.list()
agent = agents.agents[0]
async for event in client.sessions.stream(
agent.id,
input="Hello, what can you do?",
):
print(event)
asyncio.run(main())
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
gumloop-0.2.0.tar.gz
(111.9 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
gumloop-0.2.0-py3-none-any.whl
(44.4 kB
view details)
File details
Details for the file gumloop-0.2.0.tar.gz.
File metadata
- Download URL: gumloop-0.2.0.tar.gz
- Upload date:
- Size: 111.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a41779432f3ab5cdb5be17c0c950adbe859624a97e8cc79ee47a344c53547f15
|
|
| MD5 |
67b6ba7ed653a824a4648b92342fe13a
|
|
| BLAKE2b-256 |
eff30712d3a61623faacfa90f415f990fae7d468d75552a9e51e2eb95fa2925a
|
File details
Details for the file gumloop-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gumloop-0.2.0-py3-none-any.whl
- Upload date:
- Size: 44.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94934f07d3efa990a1edbef7a5b87e49437bcaa78e60b631ae2cbabc97a6a2d6
|
|
| MD5 |
93dc1c1229b3fe34efb1f176bf5fa2f7
|
|
| BLAKE2b-256 |
c249d57e4e0d33e98905e272e1c727332f5694c0a5dc9cc7f4a70580ee87d087
|