Skip to content

An asynchronous implementation of timers in Python3.

License

Notifications You must be signed in to change notification settings

extr3mis/aiotimers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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)