Skip to main content

sync 2 async

Project description

drawing

asyncify

Wheel Version py_versions Code style: black

TLDR: Sync 2 Async decorator

Install: pip install asyncify

Usage:

import asyncify

# OR
from asyncify import asyncify
from asyncify import run  # asyncio.run polyfill for python36


def add(a, b):
    return a + b


assert add(1, 2) == 3


@asyncify
def add_async(a, b):
    return a + b


res = await add_async(1, 2)
assert res == 3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asyncify-0.10.0.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

asyncify-0.10.0-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page