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-1.4.1.tar.gz
(9.4 kB
view hashes)