aioprint-0.0.4
توضیحات
Provides an asynchronous interface for print() using aiofiles.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | aioprint-0.0.4 |
| نام | aioprint |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | crrapi |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/crrapi/aioprint |
| آدرس اینترنتی | https://pypi.org/project/aioprint/ |
| مجوز | MIT |
# aioprint
`aioprint` provides an asynchronous interface for `print` by using `aiofiles` as a backend.
# Installation
### Using PyPI
`pip3 install -U aioprint`
### Using git with this GitHub repo
`pip3 install -U git+https://github.com/crrapi/aioprint`
# Usage
```python
import asyncio
import sys
import aioprint
class A:
async def __aiostr__(self):
# The __aiostr__ magic method is preferred
# over the __str__ method to provide
# a coroutine interface
return "pony trick yasuo"
async def main():
await print(["sub", 2, "pew"], "he is great", end="", sep="LOL")
a = A()
await print("error", file=sys.stderr)
await print(a, file="out.txt")
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```
# Acknowledgements
Special thanks to [Gelbpunkt aka Adrian](https://github.com/Gelbpunkt) for reviving this and making it useful
نیازمندی
| مقدار | نام |
|---|---|
| ==0.4.0 | aiofiles |
نحوه نصب
نصب پکیج whl aioprint-0.0.4:
pip install aioprint-0.0.4.whl
نصب پکیج tar.gz aioprint-0.0.4:
pip install aioprint-0.0.4.tar.gz