Skip to main content

tempfileatexit

Python library for removing temporary files and directories when program finishes.

Installation

pip install tempfileatexit

Usage

Automatic way

import tempfileatexit as tfae
(fs, my_tempfile) = tfae.mkstemp()
my_tempdir = tfae.mkdtemp()

print(tempfileatexit.list(verbose=True))

Manual way

import tempfileatexit
import tempfile

(fs, my_tempfile) = tempfile.mkstemp()
my_tempdir = tempfile.mkdtemp()

tempfileatexit.register(my_tempfile)
tempfileatexit.register(my_tempdir)


print(tempfileatexit.list(verbose=True))

After you run the code and the program exxists, the my_tempfile and my_tempdir will be gone.

Metadata

Release files for tempfileatexit 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tempfileatexit 0.0.3
File Size Uploaded
tempfileatexit-0.0.3.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tempfileatexit 0.0.3
File Interpreter ABI Platform
tempfileatexit-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.3 kB

Release files / tempfileatexit-0.0.3.tar.gz

Download URL tempfileatexit-0.0.3.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fc30db37a3a27f1cbab3469d4d286cf31a7f496039c495c1301789546a54fe32
BLAKE2b-256 checksum
How to use checksums
184d84c250a90c3ea9bdd293e98a8f1ece44b405efa2c25fbfe41df60480b2d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release files / tempfileatexit-0.0.3-py3-none-any.whl

Download URL tempfileatexit-0.0.3-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bf1945cbfe5ced15966286b4e329276a0d6d36a868646b67c780bff7f3df74d
BLAKE2b-256 checksum
How to use checksums
00a79fee02ee914c13fd18635991e0ee8d524b5ce5b539d1acf448465c9511b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page