FunTask
FunTask is a Python framework for stateful functional task dispatching and execution
- lightweight and easy
- scalable and distributed
- stateful
- task is just a
function(status, ...args) - observable
from funtask import LocalFunTaskManager, StdLogger, TaskStatus
from typing import List
import asyncio
ft = LocalFunTaskManager(StdLogger())
# increase 10 worker(in different processes) with state: ['new_state']
workers = ft.increase_workers(lambda old_state: ['new_state'], 10)
def function_task(state: List[str], logger: StdLogger, *args):
state.append("change and visit state in func task")
logger.log(f"current state is {state}, args: '{' '.join(args)}'")
return "I'm task result"
# will dispatch function_task to worker0
task = workers[0].dispatch_fun_task(function_task, "i'm", "arguments")
# async wait task result
task_result = asyncio.run(task.get_result())
assert task_result == "I'm task result"
assert task.status is TaskStatus.SUCCESS
print("end.")
Table of Contents
Installation
not support for now
pip install funtask
License
funtask is distributed under the terms of the MIT license.
Features
- local multiprocessing scheduler
- k8s + celeary task scheduler
- flet webUI
Metadata
Release files for funtask 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| funtask-0.0.4.tar.gz | 21.1 MB | Without provenance | Details for funtask-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| funtask-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for funtask-0.0.4-py3-none-any.whl |
Total release size: 21.1 MB
Release files / funtask-0.0.4.tar.gz
| Download URL | funtask-0.0.4.tar.gz |
|---|---|
| Size | 21.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85776ebebe7a62fa6b6bfaede87b19e8533fd12dbc937b8b5ba60b9da65300e0
|
|
BLAKE2b-256 checksum How to use checksums |
0844e330a02535afc23fad7ce1a0ed585fadbecbdc0f624051449542cb3cf21e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / funtask-0.0.4-py3-none-any.whl
| Download URL | funtask-0.0.4-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
621e3be792d2605f067a54a9dc55e8a54bc942e3875b801a295ed04950293b1b
|
|
BLAKE2b-256 checksum How to use checksums |
98d4b0402eb1af153e2bdf8e201f57c80eda9772afdebb189ac519915f3dac1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Security for funtask 0.0.4
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.