Skip to main content

UniWorkflow

English Version | 中文版

UniWorkflow is a Python library that provides a unified interface for integrating with various workflow providers such as Make.com and Dify.

Installation

You can install UniWorkflow using pip:

pip install uniworkflow

Quick Start

Run a make.com workflow

Here's a simple example of how to use UniWorkflow:

# import the library
from uniworkflow import UniWorkflow

# prepare the kwargs
kwargs = {
    "workflow_url": "https://example.make.com/your-workflow-hook",
    "method": "GET",
    "api_key": "your_api_key_here",
    "data": {"key1": "value1", "key2": "value2", ......},
}

# Execute a workflow
result = UniWorkflow.execute("make", **kwargs)

# print the result
print(result)

Run a dify workflow

# import the library
from uniworkflow import UniWorkflow

# prepare the kwargs
kwargs = {
    "workflow_url": "https://api.dify.ai/v1/workflows/run",
    "method": "POST",
    "api_key": "your_api_key_here",
    "data": {"key1": "value1", "key2": "value2", ......},
}

# Execute a workflow
result = UniWorkflow.execute("dify", **kwargs) 

# print the result
print(result)

Parameters

  • workflow_url: The URL of the workflow to execute.
  • method: The HTTP method to use (GET, POST, etc.).
  • api_key: The API key to use for the workflow.
  • data: The data to pass to the workflow.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Running Tests

To run the tests for UniWorkflow, you can use pytest. Make sure you have pytest installed and replace the parameters in the test cases with your own.

pip install pytest

Then, run the tests:

pytest -s tests/test_make.py
pytest -s tests/test_dify.py

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for uniworkflow 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uniworkflow 0.1.8
File Size Uploaded
uniworkflow-0.1.8.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uniworkflow 0.1.8
File Interpreter ABI Platform
uniworkflow-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 24.2 kB

Release files / uniworkflow-0.1.8.tar.gz

Download URL uniworkflow-0.1.8.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4aed7a89334b8d6243d12e247f952c7a5028995a2908be714c5be7ce6e8933e3
BLAKE2b-256 checksum
How to use checksums
434a679d95d1f0ad25da3a3e10d988afc864a86a7197b77ffcdb3c2b33eee8e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.11

Release files / uniworkflow-0.1.8-py3-none-any.whl

Download URL uniworkflow-0.1.8-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e20fac0fd078edbeb358588c3ecd7e0335aa040df0dfc68b8558e7326d14499
BLAKE2b-256 checksum
How to use checksums
f2ae8375a20439133dd62d378011cbac07c8b543e7b5c89c932bd317331ec793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page