Skip to main content

async_task_helpers

Simple asynchronous task helpers

How to install

pip install async_task_helpers

Features

Loop tasks

from async_task_helpers import loop

@loop(minutes=5, seconds=30)
async def loop_example():
    # This LoopTask will run in every 5 minute and 30 seconds.
    await some_async_task()
    await some_async_task2()

Asynchronous Callbacks

import asyncio
from async_task_helpers import async_callback_handler

async def universe_last_answer():
    print('Universe`s a whole and entire, final answer is...')
    await asyncio.sleep(1)
    print('42!')
    return 42


async def async_callback(result):
    await asyncio.sleep(5)
    print(f'I got the result of {result}!')
    

task = asyncio.create_task(
    async_callback_handler(
        universe_last_answer,
        async_callback
    ),
    name='Async Callback Test'
)

Release files for async-task-helpers 1.0.1

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

Built distribution (wheel)

Table of built distributions (wheels) for async-task-helpers 1.0.1
File Interpreter ABI Platform
async_task_helpers-1.0.1-py3-none-any.whl Python 3 none any Details

Release files / async_task_helpers-1.0.1-py3-none-any.whl

Download URL async_task_helpers-1.0.1-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f743a67640852e3fe4f57adcbf9652972a9e19a829567c69ebfe7159f1d67a8b
BLAKE2b-256 checksum
How to use checksums
12927d7038874207a3223dac39277f44ef15eedc29c9a30c10117b718d906e16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

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