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.2.tar.gz
(6.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asyncify-0.9.2.tar.gz.
File metadata
- Download URL: asyncify-0.9.2.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f06016a5d805354505e98e9c009595cba7905ceb767ed7cd61bf60f2341d896
|
|
| MD5 |
5d737ddf06fe9e24c1ff34732f175603
|
|
| BLAKE2b-256 |
237763e130b6572add8e9d368e34c23595ab87ba16c8288bd2b378177e5da2b5
|
File details
Details for the file asyncify-0.9.2-py3-none-any.whl.
File metadata
- Download URL: asyncify-0.9.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee7efe8ecc11f348d4f25d4d1c5fb2f56a187aaa907aea3608106359728a2cdd
|
|
| MD5 |
ade4f6a04f330cf3ac0e7db9b21618f0
|
|
| BLAKE2b-256 |
281ba22396ebd97db9c4b11af4075944fd825e7967e828789550952e705e9b42
|