Metadata-Version: 2.1
Name: flowdapt_sdk
Version: 0.1.2
Summary: Python SDK for Flowdapt
Home-page: https://gitlab.com/emergentmethods/flowdapt-python-sdk
License: MIT
Author: Emergent Methods
Author-email: contact@emergentmethods.ai
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: httpx (>=0.25.2,<0.26.0)
Requires-Dist: orjson (>=3.9.10,<4.0.0)
Requires-Dist: pydantic (>=1.10.13,<3)
Project-URL: Repository, https://gitlab.com/emergentmethods/flowdapt-python-sdk
Description-Content-Type: text/markdown

# Flowdapt Python SDK

![GitLab Release (latest by SemVer)](https://img.shields.io/gitlab/v/release/emergentmethods/flowdapt-python-sdk?style=flat-square)
![GitLab](https://img.shields.io/gitlab/license/emergentmethods/flowdapt-python-sdk?style=flat-square)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flowdapt_sdk?style=flat-square)

This is the official Python SDK for the Flowdapt API. It provides a simple way to programmatically interact with Flowdapt in Python. It is asynchronous and uses `httpx` as the underlying HTTP client.

## Installation

```bash
pip install flowdapt_sdk
```

## Usage

```python
import asyncio
from flowdapt_sdk import FlowdaptSDK

async def main():
    async with FlowdaptSDK(base_url="http://localhost:8080/") as client:
        print(await client.ping())

        workflows = await client.workflows.list_workflows(version="v1alpha1")
        print(workflows)

        workflow = await client.workflows.get_workflow("my-workflow", version="v1alpha1")
        print(workflow)

        result = await client.workflows.run_workflow(
            identifier="my-workflow",
            input={"x": 5},
            wait=True,
            namespace="default",
            version="v1alpha1"
        )
        print(result)
```
