Skip to main content

asyncio util library

Project description

Asyncio util library

periodic_call

Allows periodically execute an awaitable incorruptible with event.

import signal
import asyncio
from asinc import periodic_call


async def run():
    stop_event = asyncio.Event()
    signal.signal(signal.SIGINT, lambda: stop_event.set())
    
    await periodic_call(lambda: asyncio.sleep(1), stop_event, 10)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asinc-0.1.0.tar.gz (1.0 kB view details)

Uploaded Source

Built Distribution

asinc-0.1.0-py3-none-any.whl (1.4 kB view details)

Uploaded Python 3

File details

Details for the file asinc-0.1.0.tar.gz.

File metadata

  • Download URL: asinc-0.1.0.tar.gz
  • Upload date:
  • Size: 1.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.2.0

File hashes

Hashes for asinc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 20f71dc473216bbc44c90e6dfb7513b1131a3ace8d7c4357947175851024343f
MD5 4872e5104339118cea5d27fdcaccd282
BLAKE2b-256 99b9c948afd8fb068243fe019fdaf76b6c4b03e9365186d56b8ae776b71d166b

See more details on using hashes here.

File details

Details for the file asinc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: asinc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.2.0

File hashes

Hashes for asinc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 045bc581f9bc9eee9c4eeb61c33f49c3eeb0fbf6843f88291fe2d2ca2a79ec14
MD5 3221deb5d44866a782239838e58b209b
BLAKE2b-256 1fd958e11f3841d91bd2e3198d4e8578f0fbf801a5cde23874f7259a7ee3b646

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page