Skip to main content

Safeout: write out a file safely

With safeout, you can write:

from safeout import safeout
with safeout('output.txt') as output:
    output.write("Hello world\n")

and this will write out the file output.txt in a safe, atomic manner. That is, if there are any problems (Exceptions or a crash) in the with block, then there there will be no output. If the with block completes, then the output file will include the whole result.

So, if the output file exists, you can be confident that the process completed correctly.

License: MIT

Metadata

Release files for Safeout 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 Safeout 0.3
File Size Uploaded Provenance Actions
Safeout-0.3.tar.gz 2.0 kB Without provenance Details for Safeout-0.3.tar.gz

Release files / Safeout-0.3.tar.gz

Download URL Safeout-0.3.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3703b522f865f81338d07c95d3ceaf7bda2fa46dfbe6da5590a467bd7b1f1fcc
BLAKE2b-256 checksum
How to use checksums
e58a6d53feedef23966c20c79ffcd2fde8036188c21e5bdd630f26683124223f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.4.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.6.8

Security for Safeout 0.3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file 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