This project focuses on asynchronous programming in Python using the asyncio library. By the end of this project, you will be able to:
- Understand and use the
asyncandawaitsyntax in Python for asynchronous operations. - Execute an async program with asyncio.
- Run concurrent coroutines to improve program efficiency.
- Create asyncio tasks to manage asynchronous operations effectively.
- Utilize the Python
randommodule within asynchronous code.
- Python Version: Python 3.7
- Operating System: Ubuntu 18.04 LTS
- All code files follow the
pycodestyle(version 2.5.x) coding style guide. - Code files have a newline at the end.
- The first line of code files starts with
#!/usr/bin/env python3. - Functions and coroutines are appropriately type-annotated.
- Modules have documentation using
python3 -c 'print(__import__("my_module").__doc__)'. - Functions have documentation using
python3 -c 'print(__import__("my_module").my_function.__doc__)'. The documentation consists of clear and meaningful sentences describing the purpose of the function.
project-root/ │ ├── your_code_file.py ├── another_code_file.py │ └── README.md
Include instructions on how to run and use your code here.
Provide an example or code snippet demonstrating the usage of your async code and asyncio tasks.
import asyncio
async def main():
# Your async code here
pass
if __name__ == "__main__":
asyncio.run(main())