Skip to main content

f-scheduler

Simplify Lightweight Function Scheduler with Python 3

f(unction)-scheduler is a Python package designed to Simplify Lightweight Function Scheduling. It is built with Python 3.

Inspiration

The inspiration for this project came from studying the code of Apache Airflow operators.

The functionality and design patterns observed in the Airflow operators have greatly influenced the development of f-scheduler.

Installation

You can install f-scheduler using pip:

pip install f-scheduler

Usage

# import f_scheduler package
from f_scheduler import ConditionOperator, DefaultFunctionOperator, IterFunctionOperator, DAG, Converter

# create a DAG
dag = DAG(use_graphlib=True)

# add tasks to the DAG
dag.add_task(DefaultFunctionOperator(function=print, param=(['hello']), task_id='hello_task'))
dag.add_task(DefaultFunctionOperator(function=print, param=(['bye']), task_id='bye_task'))
dag.add_task(ConditionOperator(10 > 1, task_id='condition_task'))
dag.add_task(IterFunctionOperator(function=print, param=(['What your name?']), iterations=5, task_id='iter_task'))

# set the dependency between tasks :  hello_task >> condition_task >> iter_task >> bye_task
task_order = ['hello_task', 'condition_task', 'iter_task', 'bye_task']

# set the dependency between tasks
# using the converter
converter = Converter(dag)
converter.convert_list_to_dag(task_order).run()
# or dag.set_downstream('hello_task', 'condition_task')
# dag.set_downstream('condition_task', 'iter_task')

# if you want to get the return value of the task, you can use this method
print(dag.get_return_value('iter_task'))

# print all tasks
print(dag.get_all_tasks())

# clear all tasks
dag.clear()

License

f-scheduler is licensed under the Apache License.

Metadata

Release files for f-scheduler 0.4.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 f-scheduler 0.4.0
File Size Uploaded Provenance Actions
f_scheduler-0.4.0.tar.gz 8.5 kB Without provenance Details for f_scheduler-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for f-scheduler 0.4.0
File Interpreter ABI Platform Actions
f_scheduler-0.4.0-py3-none-any.whl Python 3 none any Details for f_scheduler-0.4.0-py3-none-any.whl

Total release size: 18.5 kB

Release files / f_scheduler-0.4.0.tar.gz

Download URL f_scheduler-0.4.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c90234398dddb3e98540834187fbfe51382907ade5f8aac32d3c19661f2f8464
BLAKE2b-256 checksum
How to use checksums
213eee35fd153faf6b04c294199f1b24612131fec108c8644bf3d62540118930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / f_scheduler-0.4.0-py3-none-any.whl

Download URL f_scheduler-0.4.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e80da1ff9fd4c1a17808e28836f5d3e7df1d16386390284da39ffaffe4a0d14
BLAKE2b-256 checksum
How to use checksums
b419918de821ff83f7ec1ed132e82273bc51a6312af7e5f451b79dd0e6a17a07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Security for f-scheduler 0.4.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