Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

asyncio #758

Copy link
Copy link
@tony

Description

@tony
Issue body actions

After adding sleep_after / sleep_before in #750 we need a way to sleep asynchronously

Example from this convo: pallets/click#85 (comment)

Details
import asyncio
from functools import wraps

def coro(f):
    @wraps(f)
    def wrapper(*args, **kwargs):
        return asyncio.run(f(*args, **kwargs))

    return wrapper

Usage:

@click.command()
@coro
async def command():
    await asyncio.sleep(1)
    click.echo("Delayed hello")
Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Todo
Show more project fields

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.