A python library to make things async!
Project description
A python library with helpful things to be used with asyncio!
Documentation
Installation
Python 3.7 or higher is required
$ pip install -U asyncify-python
Example
import asyncify
import requests
@asyncify.asyncify_func
def get(url: str) -> str:
return requests.get(url).text
# `get` is no longer a blocking function
# it is now a coroutine function
async def main():
text = await get('https://python.org')
# this is very useful to turn a blocking library into an async library
get = asyncify(requests.get)
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-python-2.1.0.tar.gz
(11.2 kB
view details)
File details
Details for the file asyncify-python-2.1.0.tar.gz
.
File metadata
- Download URL: asyncify-python-2.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a32b2fa1947d9d1b34c5e0331cb53c0cbbf894595702e29630fd6bed6cff70a1 |
|
MD5 | a748b9152a430f499a99c64b41dc2925 |
|
BLAKE2b-256 | ae8ad8c5d80c5668bc7af17a1b955d2b9adde08dc4621c7383fdaec254597322 |