Provides asynchronous temporary files.
Project description
aiotempfile
Overview
Provides asynchronous temporary files.
Compatibility
- Tested with python 3.8
Installation
From pypi.org
$ pip install aiotempfile
From source code
$ git clone https://github.com/crashvb/aiotempfile
$ cd aiotempfile
$ virtualenv env
$ source env/bin/activate
$ python -m pip install --editable .[dev]
Usage
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()
Environment Variables
Variable | Default Value | Description |
---|---|---|
AIOTEMPFILE_DEBUG | Adds additional debug logging. |
Development
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiotempfile-0.5.3.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for aiotempfile-0.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf67e62abb0064812b33030a606807b9937df30c045de5b1c57860d3ff25c131 |
|
MD5 | ffe7134bd03f655f82fb68baefd9d67e |
|
BLAKE2b-256 | 9fd96895fdf7e3b252b9de2a9dced12675c2d6cdc5a950e149f46186f6536dfd |