Metadata-Version: 2.4
Name: gumloop
Version: 0.2.0
Summary: Python client for the Gumloop API
Project-URL: Homepage, https://github.com/gumloop/gumloop-py
Project-URL: Bug Tracker, https://github.com/gumloop/gumloop-py/issues
Author-email: Rahul Behal <rahul@gumloop.com>
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: httpx-sse>=0.4.0
Requires-Dist: httpx>=0.24.1
Requires-Dist: keyring>=24
Requires-Dist: pydantic>=2.0.0
Requires-Dist: questionary>=2.0
Requires-Dist: rich
Requires-Dist: typer>=0.25.1
Description-Content-Type: text/markdown

# Gumloop Python Client

A Python client for the Gumloop API that makes it easy to run and monitor Gumloop flows.

## Installation

```bash
pip install gumloop
```

## Usage

```python
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)

```python
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())
```
