uniworkflow


Nameuniworkflow JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/yourusername/uniworkflow
SummaryA Python library for integrating with various workflow providers
upload_time2024-11-20 05:40:48
maintainerNone
docs_urlNone
authorYour Name
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # UniWorkflow

[English Version](README.md) | [中文版](README_zh.md)


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:

```python
# import the library
from uniworkflow import UniwWorkflow

# 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 = UniwWorkflow.execute("make", **kwargs)

# print the result
print(result)
```

### Run a dify workflow

```python
# import the library
from uniworkflow import UniwWorkflow

# 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 = UniwWorkflow.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](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/uniworkflow",
    "name": "uniworkflow",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "your.email@example.com",
    "download_url": "https://files.pythonhosted.org/packages/64/95/7ff0d30a83f7148438d27194276a26c7667f0d44f216564230cb3cce186d/uniworkflow-0.1.4.tar.gz",
    "platform": null,
    "description": "# UniWorkflow\n\n[English Version](README.md) | [\u4e2d\u6587\u7248](README_zh.md)\n\n\nUniWorkflow is a Python library that provides a unified interface for integrating with various workflow providers such as Make.com and Dify.\n\n## Installation\n\nYou can install UniWorkflow using pip:\n\n```\npip install uniworkflow\n```\n\n## Quick Start\n\n### Run a make.com workflow\nHere's a simple example of how to use UniWorkflow:\n\n```python\n# import the library\nfrom uniworkflow import UniwWorkflow\n\n# prepare the kwargs\nkwargs = {\n    \"workflow_url\": \"https://example.make.com/your-workflow-hook\",\n    \"method\": \"GET\",\n    \"api_key\": \"your_api_key_here\",\n    \"data\": {\"key1\": \"value1\", \"key2\": \"value2\", ......},\n}\n\n# Execute a workflow\nresult = UniwWorkflow.execute(\"make\", **kwargs)\n\n# print the result\nprint(result)\n```\n\n### Run a dify workflow\n\n```python\n# import the library\nfrom uniworkflow import UniwWorkflow\n\n# prepare the kwargs\nkwargs = {\n    \"workflow_url\": \"https://api.dify.ai/v1/workflows/run\",\n    \"method\": \"POST\",\n    \"api_key\": \"your_api_key_here\",\n    \"data\": {\"key1\": \"value1\", \"key2\": \"value2\", ......},\n}\n\n# Execute a workflow\nresult = UniwWorkflow.execute(\"dify\", **kwargs) \n\n# print the result\nprint(result)\n```\n\n## Parameters\n\n- `workflow_url`: The URL of the workflow to execute.\n- `method`: The HTTP method to use (GET, POST, etc.).\n- `api_key`: The API key to use for the workflow.\n- `data`: The data to pass to the workflow.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Running Tests\n\nTo 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.\n\n```\npip install pytest\n```\n\nThen, run the tests:\n\n```\npytest -s tests/test_make.py\npytest -s tests/test_dify.py\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library for integrating with various workflow providers",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/yourusername/uniworkflow"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ffd188056f36f94a32dd3a73abfbf9fed55b047caca45ae0234d06d605a7ff14",
                "md5": "4432959f42651b74cda002c7fdf994cb",
                "sha256": "575df7659767d984393cd308d6004f04ca9c9761c58627f5267591f172a1cc25"
            },
            "downloads": -1,
            "filename": "uniworkflow-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4432959f42651b74cda002c7fdf994cb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9076,
            "upload_time": "2024-11-20T05:40:46",
            "upload_time_iso_8601": "2024-11-20T05:40:46.926240Z",
            "url": "https://files.pythonhosted.org/packages/ff/d1/88056f36f94a32dd3a73abfbf9fed55b047caca45ae0234d06d605a7ff14/uniworkflow-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64957ff0d30a83f7148438d27194276a26c7667f0d44f216564230cb3cce186d",
                "md5": "b3f4da0b8e5acb1fd4fbee436c8ead0a",
                "sha256": "9df261305125e93f3f9a115bd5310e95cdf8f5cc0392368033b3e8a5854b4398"
            },
            "downloads": -1,
            "filename": "uniworkflow-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b3f4da0b8e5acb1fd4fbee436c8ead0a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 18263,
            "upload_time": "2024-11-20T05:40:48",
            "upload_time_iso_8601": "2024-11-20T05:40:48.988865Z",
            "url": "https://files.pythonhosted.org/packages/64/95/7ff0d30a83f7148438d27194276a26c7667f0d44f216564230cb3cce186d/uniworkflow-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 05:40:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "uniworkflow",
    "github_not_found": true,
    "lcname": "uniworkflow"
}
        
Elapsed time: 0.44120s