Skip to content

aliev/aliev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 

Repository files navigation

Hi there πŸ‘‹

πŸ”­ I’m currently working on aioauth - Asynchronous OAuth 2.0 framework for Python 3

πŸ”­ I’m currently working on baker

πŸ€” I’m looking for help with baker


πŸ”­ I created new library - aioshutdown the context manager that provides simple graceful shutdown interface for your asyncio tasks.

Usage example:

import asyncio
from aioshutdown import SIGTERM, SIGINT, SIGHUP


async def my_task(sleep: int):
    try:
        ...
    except asyncio.CancelledError as exc:
        # Your graceful shutdown logic here


# The list of the signals, that you want to handle
with SIGTERM | SIGHUP | SIGINT as loop:
    # The list of your tasks
    tasks = [loop.create_task(my_task(i)) for i in range(1, 10)]
    loop.run_forever()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published