Skip to main content

acts-channel

Acts-channel is a workflow client to connect to acts-server

Usage

Before connecting, please download acts-server and start it

pip install acts-channel

Example

import signal
import sys
import time

from acts_channel import Channel


def signal_handler(signal, frame):
    print('Caught Ctrl+C / SIGINT signal')
    sys.exit(0)

def main():
    chan = Channel(url = "127.0.0.1:10080")
    signal.signal(signal.SIGINT, signal_handler)
    model = """
    id: test
    name: workflow in python
    ver: 0.1.0
    steps:
        - name: step 1
          id: step1
          uses: acts.core.irq
          params:
            key: abc
    """
    resp = chan.deploy(model)

    ret = resp.unwrap_or_raise(ValueError)
    print("chan.deploy:", ret)

    resp = chan.send("model:get", { "id": "test", "fmt": "tree"})
    print(resp.ok_value["data"])

    chan.subscribe("client-1", on_message)

    resp = chan.start("test", { "custom": "aaa" })
    print(resp.ok_value)

    print("waiting for all messages...")
    time.sleep(5)

def on_message(chan: Channel, message):
    print(f"on_message: {message}")
    if message["key"] == "abc":
        chan.act("complete", message["pid"], message["tid"], {})


if __name__ == "__main__":
    main()

Metadata

Release files for acts-channel 0.5.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 acts-channel 0.5.0
File Size Uploaded Provenance Actions
acts_channel-0.5.0.tar.gz 2.6 kB Without provenance Details for acts_channel-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acts-channel 0.5.0
File Interpreter ABI Platform Actions
acts_channel-0.5.0-py3-none-any.whl Python 3 none any Details for acts_channel-0.5.0-py3-none-any.whl

Total release size: 5.5 kB

Release files / acts_channel-0.5.0.tar.gz

Download URL acts_channel-0.5.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
41f806b3b33c7b5701d23c0e60bcc61d85f5403815d5d801c3fc5250ca55af9d
BLAKE2b-256 checksum
How to use checksums
3ba1e3ff723960b2e863ba635337e2c392646d14038cae102d8e551b6d92dca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release files / acts_channel-0.5.0-py3-none-any.whl

Download URL acts_channel-0.5.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50a91f32881c812b13d994ded5cbbdc627d0625901494b89ed2732b8800e2a21
BLAKE2b-256 checksum
How to use checksums
c05ed3a7a7dd35d8770c03e1a977c1ee9cdf97de3c750631b728ec5b6ad23591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Security for acts-channel 0.5.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.

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