Last updated:
0 purchases
asyncioperiodic 2019.2
# periodicSimple tool for run asyncio tasks periodically.# Setup```bashpip install asyncio-periodic```# Example usage```pythonimport asynciofrom datetime import datetimefrom periodic import Periodicasync def periodically(param): print(datetime.now(), 'Yay!', param) await asyncio.sleep(1) print(datetime.now(), 'Done!')async def main(): p = Periodic(3, periodically, 'Periodically!') await p.start()if __name__ == "__main__": loop = asyncio.get_event_loop() loop.create_task(main()) loop.run_forever()```
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.