sync 2 async
Project description
asyncify
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
Release history Release notifications | RSS feed
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.9.1.tar.gz
(6.2 kB
view details)
Built Distribution
File details
Details for the file asyncify-0.9.1.tar.gz
.
File metadata
- Download URL: asyncify-0.9.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa23088f016a67a76eeb14e6bd0db291d513ef559f5e56aa7a8103d24ba3a947 |
|
MD5 | 5ef5c2e004117c9376fb8a402af30ce7 |
|
BLAKE2b-256 | 68c917678365df01e636a6fbf53cf521e13373eb46bbd5af94cec5b76b938cb7 |
File details
Details for the file asyncify-0.9.1-py3-none-any.whl
.
File metadata
- Download URL: asyncify-0.9.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0387ffcac52bb38978c420ef7e6ba8d6d4aaad5112eb1ebbe331e421ed080c2c |
|
MD5 | 97951598201b765eebf41ca09dbf0d63 |
|
BLAKE2b-256 | aaf54e954a5a4aca3c3f4c934f2a99938a65fc4ca8b379e8d094a5973cdee58f |