Package: iwf-python-sdk
iwf-python-sdkPython SDK foriWF workflow enginepip install iwf-python-sdk==0.1.0Seesamplesfor examples.RequirementsPython 3.9+iWF serverConceptsTo implement a workflow, the two most core interfaces areWorkflow interfacedefines the workflow definitionWorkflowState interfacedefines the workflow states for workflow definitionsA workflow can contain any number of WorkflowStates.See more inhttps://github.com/indeedeng/iwf#what-is-iwfDevelopment Plan1.0 -- the basic and most frequently needed featuresStart workflow APIExecutingwait_until/executeAPIs and completing workflowParallel execution of multiple statesGetWorkflowResultsWithWait APIStateOption: WaitUntil(optional)/Execute API timeout and retry policyGet workflow with wait APITimer commandAnyCommandCompleted and AllCommandCompleted waitingTypeInternalChannel commandDataAttributeStop workflow APIImprove workflow uncompleted error return(canceled, failed, timeout, terminated)Support execute API failure policySupport workflow RPCSignal commandReset workflow APISkip timer API for testing/operationFuture -- the advanced features that already supported in server. Contributions are welcome to implement them in this SDK!Atomic conditional complete workflow by checking signal/internal channel emptinessDynamic data/search attributes and internal/signal channel definitionState options overridden dynamicallyDescribe workflow APITryGetWorkflowResults APIConsume N messages in a single commandDecider trigger type: any command combinationWait_until API failure policyCaching on persistenceStateExecutionLocal and recordEvents APISearchAttribute: Keyword, Double, Bool, Datetime, Keyword array, TextWorkflow start options: initial search attributesGet workflow DataAttributes/SearchAttributes APIRunning iwf-server locallyOption 1: use docker composeSeeiwf READMEOption 2: VSCode Dev ContainerDev Container is an easy way to get iwf-server running locally. Follow these steps to launch a dev container:Install Docker, VSCode, andVSCode Dev Container plugin.Open the project in VSCode.cdiwf-python-sdk
code.Launch the Remote-Containers: Reopen in Container command from Command Palette (Ctrl + Shift + P). You can also click in the bottom left corner to access the remote container menu.Once the dev container starts, iwf-server will be listening on port 8801.How To ContributeThis project usesPoetryas a dependency manager. Check out Poetry'sdocumentation on how to install iton your system before proceeding.❗Note: If you use Conda or Pyenv as your environment / package manager, avoid dependency conflicts by doing the following first:Before installing Poetry, create and activate a new Conda env (e.g. conda create -n langchain python=3.9)Install Poetry (see above)Tell Poetry to use the virtualenv python environment (poetry config virtualenvs.prefer-active-python true)Continue with the following steps.To install requirements:poetryinstallUpdate IDLInitialize the IDL Git submodulegitsubmoduleupdate--init--recursiveUpdate IDL to the latest commit.gitsubmoduleupdate--remote--mergeGenerate API client from IDLThis project usesopenapi-python-clientto generate an API client from the IDL. To update the generated client:cdiwf&&poetryrunopenapi-python-clientupdate--path../iwf-idl/iwf-sdk.yaml--config.openapi-python-client-config.yamThen runcd .. && cp -R iwf/iwf_api/iwf_api/* iwf/iwf_api && rm -R iwf/iwf_api/iwf_api && poetry updatetoFix the api package pathUpdate the local path dependency.LintingTo run linting for this project:poetryrunpre-commitrun--show-diff-on-failure--color=always--all-filesCode of ConductThis project is governed by theContributor Covenant v 1.4.1. (Review the Code of Conduct and remove this sentence before publishing your project.)LicenseThis project uses theApache 2.0license. (Update this and the LICENSE file if your project uses a different license.)