PyRAM
A Python library for managing RAM disks on Windows. Based on ImDisk with RamDisk and WinFs with WinFsPy. Project target it is:
- Create more simple API than original library
- Do more stable than original library
- Give additional functional than original library
Features
- Create RAM disks.
- Remove RAM disks.
- Track disks managed by a
MemoryStorageinstance. - 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.13 and higher
RAM disk operations may require administrator privileges.
Installation
Install ImDisk and the required Python dependencies before using PyRAM. You can install library using 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, because 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
MemoryStorageinstance.
License
MIT
Documentation
- classes
- MemoryObject. Just dict with dicts
- MemoryPythonFolder. Virtual file system, where you can save only string data types
- MemoryStorage. Class where access create folders(experimental only WinFsPy) and disks in ram and see it in explorer
- DiskInfo. Just dataclass, has no methods
MemoryObject methods
- write. Save value
- read. Get value
- delete. delete value
- object_sum/object_sub/object_div/object_mul/object_equal. Operations with objects
MemoryPythonFolder methods
- write. Save value
- read. Get value
- listdir. Get list of folders
- delete. Delete value
MemoryStorage methods
- get_all_drives. Get all drives
- remove_disk_imdisk. Create disk in RAM using ImDisk
- remove_disk_imdisk. Delete disk, that created using ImDisk
- format_ramdisk. Format disk
- get_all_disks/get_all_folders/get_all_processes. Get all disks/folders/processes
- create_disk_winfspy. Create disk in RAM using WinFsPy
- create_folder_winfspy. Create folder in RAM using WinFsPy
- remove_storage_winfspy. Remove storage, that created using WinFsPy
- get_windows_disk. Get Windows disk
- check_disk_formatted. Check disk formatted or not
- get_drive_label. Get disk label
- is_drive_readonly. Check disk read-only or not
- get_disk_info. Get info about disk
Metadata
Release files for PyRAMObjects 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyramobjects-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pyramobjects-0.1.1-py3-none-any.whl |
Release files / pyramobjects-0.1.1-py3-none-any.whl
| Download URL | pyramobjects-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e985476bb1db64e19dc0882d30c1fed9d9813fefaaec42947abb928ffda6a9b1
|
|
BLAKE2b-256 checksum How to use checksums |
b9f5b4cb781e9a3b359aeb7d32415848c3fead10bf0c2f8ede8812c1e0a53ca9
|
| 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.1
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.