Skip to main content

machinery

State-aware workflow orchestrator.

This project aims to bring stateful workflows, by defining a list of actions representing multiple microservices.

Define a suite of actions to process events, abstract intelligence for your microservices.

Once defined, use your workflows to process your Events.

Example

We have 3 microservices:

  • The upper microservice that transforms texts into uppercase
  • The reverse microservice that reverses a text
  • The space-counter microservice that returns the number of space in a string

Suppose we want to process some text by making it uppercase and reversing it.

We will define the following definitions:

Then, we can define a Workflow in examples/definitions/workflow-process-text.json.

After having created our Workflow, we can send our first Event !

We will send the content of examples/definitions/event-text.json

Goals

  • Register services (ex: a new API)
  • Define a simple Workflow (subsequent calls to different services)
  • Allow async (expose endpoint for webhook?)
  • Visualisation

Components

API (WIP)

Could be divided into Consumer API and Management API.

  • Register services
  • Define Workflows (json with arbitrary service definition)
  • Treat Event

Data structures

Service

{
    "name": "my-service-name",
    "address": "http://my-service:5000/",
    "spec": {
        "inputs": {
            "message": {
                "type": "string",
                "description": "The text to transform"
            }
        },
        "outputs": {
            "message": {
                "type": "string",
                "description": "The transformed text"
            }
        }
    }
}

input:

  • name: The name of the Service
  • address: The URL of the Service
  • spec: The inputs/outputs of this Service
  • spec.inputs: Each input with its type and description
  • spec.outputs: Each output with its type and description

output: TBD (service-id, ack date)

Event

POST /e/<workflow-id>

{
    "data": {
        "message": "The Sun will rise in the morning !"
    }
}

POSTing an Event will return an event-id, an ack date and a status. input:

  • data: The Event's data that must match the Workflow's inputs.

Workflow

{
    "name": "my-workflow",
    "spec": {
        "services": ["service-1", "service-2"],
        "inputs": {
            "message": {
                "type": "string",
                "description": "The text to process"
            }
        },
        "outputs": {
            "message": {
                "type": "string",
                "description": "The processed text"
            }
        },
        "operations": { }
    }
}

input:

  • name: The name of the Workflow
  • spec: The spec of the Workflow
  • spec.services: The Services to be called, in order
  • spec.inputs: The inputs of this Workflow
  • spec.outputs: The outputs of this workflow

output: TBD (workflow-id, ack date)

Metadata

Release files for workflow-machinery 0.0.0

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

Source distribution (sdist)

Source distribution for workflow-machinery 0.0.0
File Size Uploaded Provenance Actions
workflow-machinery-0.0.0.tar.gz 8.1 kB Without provenance Details for workflow-machinery-0.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for workflow-machinery 0.0.0
File Interpreter ABI Platform Actions
workflow_machinery-0.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for workflow_machinery-0.0.0-py2.py3-none-any.whl

Total release size: 11.0 kB

Release files / workflow-machinery-0.0.0.tar.gz

Download URL workflow-machinery-0.0.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7ee32048849dc3d67f453e55173f1d1c2a7275beeff91931210ec054fe1075c0
BLAKE2b-256 checksum
How to use checksums
9eef46b6779597ec5fa009da082ea9f4e112d26748e2a44bbf9e6805df802c6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release files / workflow_machinery-0.0.0-py2.py3-none-any.whl

Download URL workflow_machinery-0.0.0-py2.py3-none-any.whl
Size 2.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
69cd30c446d78f18f9f8b21157b47376451f8a422fb93802a56ae670e3c1a3e7
BLAKE2b-256 checksum
How to use checksums
9864a24edf98dbd18b97f56001ff411d928acccc215efadeb1bf48d5133b8d69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Security for workflow-machinery 0.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files No provenance

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