extr3mis / aiotimers

An asynchronous implementation of timers in Python3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aiotimers

An asynchronous implementation of background timers in Python3. Requires Python 3.5+

Installation

Install this package using pip.

$ pip install git+https://github.com/extr3mis/aiotimers.git

Usage

Import the package using the given import statement.

>>> from aiotimers import Timer

Now you can simply make a Timer object and initialize it with the time (in seconds) you want to wait until, and the callback function/coroutine that you want to be called once the timer is complete. Optionally, you can also pass args and kwargs as a tuple and a dict respectively.

>>> timer = Timer(30.00, mycallback)

About

An asynchronous implementation of timers in Python3.

License:MIT License


Languages

Language:Python 100.0%