Skip to main content

temppath

Provides a quick way to get a pathlib.Path file in the system-defined temporary space. temppath does not wrap tempfile.NamedTemporaryFile, as that automatically deletes on close, and does not allow the same file to be written, closed, then read in Windows, which is inconsistent with the Unix implementation. Since temppath provides pathlib.Path objects, this is not an issue.

Usage

There is a nice context manager, which will remove the path for you.

from temppath import TemporaryPathContext

with TemporaryPathContext() as t:
    t.write_text('the quick brown fox jumps over the lazy dog')
    ...
    do_something_awesome_that_reads(t)

# The file is removed when you leave the `with` context.

You also have the option to just clean it up yourself if you need more control.

from temppath import TemporaryPath

t = TemporaryPath()
t.write_text('the quick brown fox jumps over the lazy dog')
...
do_something_awesome_that_reads(t)
...
t.unlink()

Metadata

Release files for temppath 2021.236.907

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

Source distribution (sdist)

Source distribution for temppath 2021.236.907
File Size Uploaded Provenance
temppath-2021.236.907.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 6.3 kB

Release files / temppath-2021.236.907.tar.gz

Download URL temppath-2021.236.907.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f24807f96c801a172c66eb59d491db8255275803d6a86fe5b39dd27eaecf0fb9
BLAKE2b-256 checksum
How to use checksums
00ea00d72a7940b0da9c13743f842eab6d857cbe32c136620fb8cfd71ff70d36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Release files / temppath-2021.236.907-py3-none-any.whl

Download URL temppath-2021.236.907-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cce55c6b7f595a0b3cba801ab5e47d23fdde95570ac55b7c39d3fe690da3f76
BLAKE2b-256 checksum
How to use checksums
c5920909b9db62a83df1a992b45786bbb80863bd6237cb483c5309d686b51f91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Security for temppath 2021.236.907

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

2021.236.907 This release

2 release files No provenance

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