This commit is contained in:
Maxim Devaev
2024-07-08 03:41:29 +03:00
parent e0bbf6968e
commit 630610bc53
50 changed files with 3835 additions and 77 deletions

View File

@@ -45,6 +45,11 @@ async def read_file(path: str) -> str:
return (await file.read())
async def write_file(path: str, text: str) -> None:
async with aiofiles.open(path, "w") as file:
await file.write(text)
# =====
def run(coro: Coroutine, final: (Coroutine | None)=None) -> None:
# https://github.com/aio-libs/aiohttp/blob/a1d4dac1d/aiohttp/web.py#L515