aiotempfile

Provides asynchronous temporary files.


Keywords
aio, aiotempfile, async, asynchronous, file, files, temp, temporary
License
Apache-2.0
Install
pip install aiotempfile==0.5.5

Documentation

aiotempfile

pypi version build status coverage status python versions linting code style license

Overview

Provides asynchronous temporary files.

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

Source Control