python task api
Project description
Ruminaq python package is part of Ruminaq project https://github.com/systemincloud/ruminaq. This package is an api for writing custom tasks in python.
Installation
Install with pip.
$ pip install ruminaq
Code Demo
Define a custom task as follow:
@python_task_info(generator=True, external_source=True)
@parameter(name="param")
class MyPythonTask(PythonTask):
def __init_ports__(self):
self.in1 = InputPort(name="in1", data_type=Bool)
self.in2 = InputPort(name="in2", data_type=Bool, asynchronous=True)
self.out = OutputPort(name="out", data_type=Bool)
def execute_async(self, async_in):
""" this will run when asynchronous port
receive data """
def execute_ext_src(self):
""" this will run after internal
request """
def generate(self):
""" this will run periodicaly """
def execute(self, grp):
""" this will run when all synchronous ports
from group receive data """
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ruminaq-1.0.2.tar.gz
(6.6 kB
view details)
File details
Details for the file ruminaq-1.0.2.tar.gz.
File metadata
- Download URL: ruminaq-1.0.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8603736d2b635a2e4da0f6b02ead46f7bbd0cf5748c2bcb0db1bbe83fcfd1f96
|
|
| MD5 |
3ba86166b8107c5f970c9266f56a5083
|
|
| BLAKE2b-256 |
378d635a0deb4142d2ea4c09e991f5cebe7cf7d798c89a9710359fe04b84395e
|