Skip to main content

mount-image

PyPI version Python License OS

CI codecov

Downloads total Downloads/month Downloads/week

Cross-platform disk image mounting via loop devices (Linux) or hdiutil (macOS).

Features

  • mount_image — attach a disk image as a loop device and mount it: Linux uses losetup + mount, macOS uses hdiutil attach + mount
  • umount_image — unmount and detach a disk image
  • attach_image — attach a disk image as a block device without mounting (for raw block I/O)
  • detach_image — detach a raw block device

Quick start

from mount_image import mount_image, umount_image

# Mount a disk image
device, mount_point = mount_image('/path/to/disk.img')
print(f'Mounted {device} at {mount_point}')

# ... do work with the mounted filesystem ...

# Unmount and detach
umount_image(device, mount_point)

Raw device access (no mount)

from mount_image import attach_image, detach_image

dev = attach_image('/path/to/disk.img')
# Read/write raw blocks via /dev/loop0 or /dev/disk5
detach_image(dev)

Note: All functions require sudo for losetup/mount (Linux) or hdiutil/mount (macOS).

License

GPL-3.0-only

Metadata

Release files for mount-image 0.5.0

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

Source distribution (sdist)

Source distribution for mount-image 0.5.0
File Size Uploaded Provenance Actions
mount_image-0.5.0.tar.gz 19.5 kB With provenance Details for mount_image-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mount-image 0.5.0
File Interpreter ABI Platform Actions
mount_image-0.5.0-py3-none-any.whl Python 3 none any Details for mount_image-0.5.0-py3-none-any.whl

Total release size: 36.2 kB

Release files / mount_image-0.5.0.tar.gz

Download URL mount_image-0.5.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
52101c622d879152023b71722a01fe3fe5c509774dbe8b9d8c08eeaf4046456b
BLAKE2b-256 checksum
How to use checksums
7ae24483f685d132a820255463a8cda0f30f0dcbfba6fc6e403e3372e5f0d519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Release files / mount_image-0.5.0-py3-none-any.whl

Download URL mount_image-0.5.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab4ae0c2bf2fae0629af9caddf3068ff6c2ceeea12027fa12de71e7185fbbe00
BLAKE2b-256 checksum
How to use checksums
c80f5a525f1c9a6df908457e3f20abe360d62b805140387aa99a8832f212483f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Security for mount-image 0.5.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mount_image-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

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.

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