asyncio-periodic 2019.2

Creator: coderz1093

Last updated:

Add to Cart

Description:

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()```

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.