Skip to main content

A simple workflow manager that can execute developer-defined methods from user-defined workflow files.

Project description

pyconduit

A simple workflow manager that executes pre-defined functions from user-defined workflow files. You ("developer") create the functions, and they ("users") will able to call the functions by typing its name and pass the required parameters.

It can be used to provide a "custom code evaluation" / "safe eval" feature to your users in your app. So they will only able to access functions that you allow. Users can also reference to other steps, set variables, and use standard functions in their workflow files.

pyconduit comes with Text, Math, Dictionary, List and Variable blocks like in Python's standard built-in functions. So you don't need to reinvent the wheel by writing these functions again.

It does not execute multiple functions in the same time. It executes functions step by step (because that's a how "workflow" works), so next function will only execute after previous function has finished execution. Even if they are asynchronous / coroutines.

Features

  • Prevent access to a block for specific user. For example, if you have a block that makes a HTTP request, you can add a label to it, and pyconduit will not allow your users to use the function if job doesn't have that label too.

  • Add step limits, max usage limit for a block per workflow (it can be changed for a specific job too).

  • If you install pydantic library in your environment, pyconduit will use it automatically to enforce type hints / annotations in function parameters, so users won't able to send invalid type of values when parameter expects a specific type of value.

  • Use Context Tags in the workflows to access variables, get the return value of previous steps and read object values with dotted path. For example, users can type {: my_step_id :} in the workflow to get the return value of my_step_id dynamically.

Warning

As pyconduit can be used as "isolated space", you should be careful about functions that you enabled to user. (for example, you shouldn't make a function that allows users to get a global value in the runtime from their input). Also, even pyconduit blocks access to keys that starts or ends with underscore, there is no 100% warranty about security.

Install

python -m pip install pyconduit

Links

License

Source code is licensed under MIT license. You must include the license notice in all copies or substantial uses of the work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyconduit-1.0.4.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

pyconduit-1.0.4-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

Details for the file pyconduit-1.0.4.tar.gz.

File metadata

  • Download URL: pyconduit-1.0.4.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for pyconduit-1.0.4.tar.gz
Algorithm Hash digest
SHA256 84471f9fae14a8a4cbd99897386c163dbaa9153e8fcaf67695b44bd4a212c43d
MD5 8c52e9022949b57b8ecec95e2d6a6087
BLAKE2b-256 58bd35bfb9e118c4aa3d23afd77e752a48530db6a52765d222b127bf22b73283

See more details on using hashes here.

File details

Details for the file pyconduit-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyconduit-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for pyconduit-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8cba872c9337c3eb3d418bd9d36d6a37e2603351f9e914cad7f63ad7e2af897
MD5 77acff1c00c97b8f5105acb9550ede36
BLAKE2b-256 464640c5d8b8118b81973eb67588664c63a4dba7e20920b273269c9e38e8373e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page