Skip to main content

Schedule recurring coroutines using asyncio

Project description

aio-recurring

Recurring coroutines using asyncio

Usage:

import asyncio
from datetime import datetime

from aio_recurring.job import (
    recurring,
    run_recurring_jobs,
)


@recurring(every=5)
async def print_info_5():
    print(f"[{datetime.now()}] This coroutine is rescheduled every 5 seconds")


@recurring(every=10)
async def print_info_10():
    print(f"[{datetime.now()}] This coroutine is rescheduled every 10 seconds")


async def main():
    run_recurring_jobs()


if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.create_task(main())
    loop.run_forever()

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

aio-recurring-0.1.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

aio_recurring-0.1.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file aio-recurring-0.1.2.tar.gz.

File metadata

  • Download URL: aio-recurring-0.1.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.6 Darwin/20.3.0

File hashes

Hashes for aio-recurring-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3536ea4b6d6c82217c11c08d8e14c8fc35a64bdf9523b5e023085727e026820f
MD5 bf61d3a23d3464bfc896b89135c49dcf
BLAKE2b-256 1a006bb068d534f0a25287c986765ff24d84990652e432b70a71c7386cdc6fde

See more details on using hashes here.

File details

Details for the file aio_recurring-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aio_recurring-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.6 Darwin/20.3.0

File hashes

Hashes for aio_recurring-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0fcdfa9dfdc1626b494280a14433e66b05cfc748cb18ff0b345908c4b94e3ac9
MD5 e5c7dd787757ae11496da5f860e39d71
BLAKE2b-256 c7caf27180d5563499a2fb51741c1df1b6a4087f80d7bdcc41ea485cdb8ff03f

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