unblock comes with utilities that can be used to convert synchronous functions to async for use in event loop
Project description
unblock
unblock comes with utilities that can be used to convert synchronous functions to async for use in event loop. For documentation, refer here
Here is a quick example,
import asyncio
from unblock import asyncify
@asyncify
def my_sync_func():
#do something
if __name__ == "__main__":
asyncio.run(my_sync_func())
Release Notes:
0.0.1
Features,
- Convert your synchronous functions, methods etc. to asynchronous with easy to use constructs
- Asynchronous tasks are started in the background without the need of await keyword. Note that await is still needed to fetch results
- By default uses even loop provided by asyncio. But supports other event loops as well
- Support for ThreadPool or ProcessPool executors
- Comes with APIs to build your own asynchronous context manager, asynchronous iterators etc.
- Supports python 3.7 and above
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
get_unblock-0.0.1.tar.gz
(38.4 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 get_unblock-0.0.1.tar.gz.
File metadata
- Download URL: get_unblock-0.0.1.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a8db17e85446ff622bf80fde16398879ff4e005e50471c3794a73bd23bc30c2
|
|
| MD5 |
b5e27dc2cd7e1a1a610830da8336a253
|
|
| BLAKE2b-256 |
4db9a923f22e7628024f69a185b64821fb1de6cf2848cdb06f3e14616fd776d2
|
File details
Details for the file get_unblock-0.0.1-py3-none-any.whl.
File metadata
- Download URL: get_unblock-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
724b956bb165571f83dd9bb24765d41da026f643659e80478767011953129732
|
|
| MD5 |
43b1957baeb5407d12de596889f9f4e2
|
|
| BLAKE2b-256 |
59fb13f5d5135c1b6ed1316a845796b8cea1a4ff29d2b339f68d03b6dde79810
|