Skip to main content

Easy RAM disk for Windows: instant in-memory volumes with real file paths, backed by WinFsp.

Project description

memfile

Easy RAM disk for Windows. Create an arbitrarily-sized in-memory volume in milliseconds and get a real Windows file path inside it that any application (VLC, Photos, ImageGlass, Audacity, Python, anything) can read and write.

Backed by WinFsp via a native Rust PyO3 extension.

Why

Sometimes you need a file to exist on the filesystem, ONLY because some other app simply doesn't have the ability to open it from a memory location. If you want to write a script or an executable temporarily simply to execute it and then delete it, this is perfect. If you want easy media previews, like images, videos, and support all file formats, this is perfect, just write to the ram disk and have the OS open it in whatever is the default media viewer. Writing any of that to disk both wastes valuable SSD writes AND wastes time since ram is much much faster to write and read from. memfile gives you a real path backed entirely by RAM:

import memfile

with memfile.Volume(size_mb=64) as vol:
    path = vol.write("clip.mp4", data)   # real path like R:\clip.mp4
    os.startfile(path)                   # opens in the native player
# volume + its contents vanish on exit — zero disk writes

Requirements

  • Windows (x64)
  • WinFsp (installed automatically) (one-time, requires admin once). After that, creating and destroying volumes needs no elevation.

Installation

pip install memfile

License

memfile is licensed under the MIT License (see LICENSE).

It links the WinFsp DLL at runtime under the terms of the WinFsp FLOSS License Exception:

WinFsp - Windows File System Proxy, Copyright (C) Bill Zissimopoulos. https://github.com/winfsp/winfsp

WinFsp is a separate work (GPLv3 with a FLOSS exception) and must be installed separately by the end user. memfile does not redistribute or modify WinFsp.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memfile-0.0.3.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memfile-0.0.3-cp39-abi3-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9+Windows x86-64

File details

Details for the file memfile-0.0.3.tar.gz.

File metadata

  • Download URL: memfile-0.0.3.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for memfile-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b75172a3b20c9384218f9d0afe9b570cd3ee98bd4ce4a5b5d7c64fa4b14afdda
MD5 0983f2abf1bc47dd46d739704b5e6414
BLAKE2b-256 58f1c678c063d8be677e38de5e2eb1ba168092649f5c14b9e10ef3b66bf879d6

See more details on using hashes here.

File details

Details for the file memfile-0.0.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: memfile-0.0.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for memfile-0.0.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 82f6699aee9c6eaeda7e76f300d169c2d97ce709d51580b6f8c156096a7b5da7
MD5 2c48010320ecfe8bb1feb8cd7ed2aea5
BLAKE2b-256 27d759d8cab51f8b3fc1ff590771e2f8818e642b7bb806359f0ef6b8773ed06a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page