Skip to main content

PyRAM

A Python library for managing RAM disks on Windows. Based on ImDisk with RamDisk and WinFs with WinFsPy. Project target it is:

  1. Create more simple API than original library
  2. Do more stable than original library
  3. Give additional functional than original library

Features

  • Create RAM disks.
  • Remove RAM disks.
  • Track disks managed by a MemoryStorage instance.
  • Simple API with minimal setup.
  • Format RAM disks
  • Virtual in-memory file system

Requirements

  • Windows
  • Python
  • ImDisk
  • WinFs(Not strictly required, but necessary for the library to additional function)
  • WinFsPy(Not strictly required, but necessary for the library to additional features)
  • Python 3.12 and higer

RAM disk operations may require administrator privileges.

Installation

Install ImDisk and the required Python dependencies before using PyRAM. In short time meybe you can install PyRAM from PaPi(Pip install PyRAMObjects)

Quick Start

from PyRAM import MemoryStorage

storage = MemoryStorage()

# Create disk without parameters
storage.create_disk_ramdisk() # uses default parameters disk_name = "Z:", memory_mb_size = 2048, file_system = "ntfs"

# Create a 512 MB RAM disk
storage.create_disk_ramdisk(
    disk_name="X:",
    memory_mb_size=512,
    file_system = "ntfs"
)

# Remove the RAM disk
storage.remove_disk_ramdisk(disk_name="X:")

with MemoryStorage(cleanup_on_exit=True) as storage1: # cleaning all PyRAM disks when app closing, becouse cleanup_on_exit=True
    storage1.create_disk_imdisk(disk_name="K:", memory_mb_size=512)

Usage Notes

  • RAM disks use volatile memory. Data stored on them should be considered temporary.
  • A drive letter must be available when creating a RAM disk.
  • Creating, formatting, or removing a RAM disk may require elevated permissions.
  • The library's disk registry tracks disks managed by the current MemoryStorage instance.

License

MIT

Documentation

  • classes
  1. MemoryObject. Just dict with dicts
  2. MemoryPythonFolder. Virtual file system, where you can save only string data types
  3. MemoryStorage. Class where access create folders(experimental only WinFsPy) and disks in ram and see it in explorer
  4. DiskInfo. Just dataclass, has no methods

MemoryObject methods

  1. write. Save value
  2. read. Get value
  3. delete. delete value
  4. object_sum/object_sub/object_div/object_mul/object_equal. Operations with objects

MemoryPythonFolder methods

  1. write. Save value
  2. read. Get value
  3. listdir. Get list of folders
  4. delete. Delete value

MemoryStorage methods

  1. get_all_drives. Get all drives
  2. remove_disk_imdisk. Create disk in RAM using ImDisk
  3. remove_disk_imdisk. Delete disk, that created using ImDisk
  4. format_ramdisk. Format disk
  5. get_all_disks/get_all_folders/get_all_processes. Get all disks/folders/processes
  6. create_disk_winfspy. Create disk in RAM using WinFsPy
  7. create_folder_winfspy. Create folder in RAM using WinFsPy
  8. remove_storage_winfspy. Remove storage, that created using WinFsPy
  9. get_windows_disk. Get Windows disk
  10. check_disk_formatted. Check disk formatted or not
  11. get_drive_label. Get disk label
  12. is_drive_readonly. Check disk read-only or not
  13. get_disk_info. Get info about disk

Metadata

Release files for PyRAMObjects 0.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for PyRAMObjects 0.1.0
File Interpreter ABI Platform Actions
pyramobjects-0.1.0-py3-none-any.whl Python 3 none any Details for pyramobjects-0.1.0-py3-none-any.whl

Release files / pyramobjects-0.1.0-py3-none-any.whl

Download URL pyramobjects-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27ef375022da46c32625e495fad0e0708b8cdd25328fa7d7bc4f5afe2ea6c88f
BLAKE2b-256 checksum
How to use checksums
9d3d993f156a66741b416010fb2b52ebd7f78b59ffdda6c1dbdebd2b37f33eae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for PyRAMObjects 0.1.0

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.1.0 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