Provides asynchronous temporary files.
From pypi.org
$ pip install aiotempfile
$ git clone https://github.com/crashvb/aiotempfile
$ cd aiotempfile
$ virtualenv env
$ source env/bin/activate
$ python -m pip install --editable .[dev]
This implementation is a derivation of aiofiles and functions the same way.
import aiotempfile
async with aiotempfile.open() as file:
file.write(b"data")
If the context manager is not used, files will need be explicitly closed; otherwise, they will only be removed during the interepreter teardown.
import aiotempfile
file = await aiotempfile.open()
file.write(b"data")
file.close()
Variable | Default Value | Description |
---|---|---|
AIOTEMPFILE_DEBUG | Adds additional debug logging. |