
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Temporary files and directories.
Contains replacement for tempfile.NamedTemporaryFile
that does not delete
the file on close()
, but still unlinks it after the context manager ends,
as well as a mkdtemp
-based temporary directory implementation.
A typical use-case that is not possible with the regular
NamedTemporaryFile
:
.. code-block:: python
import volatile
with volatile.file() as tmp:
# tmp behaves like a regular NamedTemporaryFile here, except for that
# it gets unlinked at the end of the context manager, instead of when
# close() is called.
tmp.close()
# run the users $EDITOR
run_editor(tmp.name)
buf = open(tmp.name).read()
# ...
Temporary directories:
.. code-block:: python
import volatile
with volatile.dir(): as dtmp:
pass # ... can use directory here
# a missing dtmp will not throw an exception!
Unix domain sockets:
.. code-block:: python
import volatile
with volatile.unix_socket(): as (sock, addr):
# sock is the bound socket, addr its address on the filesystem
pass # ... can use directory here
The source is fairly short and contains API docs in the comments <https://github.com/mbr/volatile/blob/master/volatile/__init__.py>
_.
FAQs
A small extension for the tempfile module.
We found that volatile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.