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
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 for reviving this and making it useful
Metadata
Release files for aioprint 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aioprint-0.0.4.tar.gz | 67.7 kB | Details |
Release files / aioprint-0.0.4.tar.gz
| Download URL | aioprint-0.0.4.tar.gz |
|---|---|
| Size | 67.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37d8f905a33ba04db86e865b704469774d2d196de9f43d1861fc1f2e13e286a6
|
|
BLAKE2b-256 checksum How to use checksums |
a8c088a7d4c6d1b4767537e253bc76ea6c4e776a9b3996cf5da33d78dc1af9b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1
|