Install & Compatibility
Where this runs
tested against v2020.7.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.012s · 19.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.5s · import 0.010s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
tempfile
✓ from temp import tempfile
✗ import tempfile
tempfile is a standard library, but this library provides a different 'tempfile' function
tempdir
✓ from temp import tempdir
Use 'from temp import tempdir' to get the tempdir function
Basic usage of tempfile and tempdir context managers.
from temp import tempfile, tempdir
# Create a temporary file
with tempfile() as f:
f.write(b'test')
f.seek(0)
print(f.read())
# Create a temporary directory
with tempdir() as d:
print(d)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'temp'
The package is not installed, or you are trying to import the wrong name.
fixRun 'pip install temp'.
AttributeError: module 'temp' has no attribute 'tempfile'
The package might be imported incorrectly, or an older version lacks the function.
fixUse 'from temp import tempfile' and ensure you have version 2020.7.2 or later.
Upgrade
Version history
2020.7.2latest on PyPI · released Jul 7, 2020
Audit
Dependencies
No dependency data recorded yet.