Skip to main content

unmount-image

Disk image unmount and detach via udisksctl (Linux).

PyPI version Python License OS

CI codecov

Downloads total Downloads/month Downloads/week

Quick start

from unmount_image import umount_image

umount_image('/dev/loop0', mount_point='/run/media/user/IMG')

API

  • umount_image(device, mount_point=None, strategy=UNMOUNT_RETRY_THEN_LAZY) — unmount + detach
  • detach_image(device) — detach only (non-blocking)
  • umount_inner(device) — unmount only, used by the mount-image orchestrator
  • detach_inner(device) — detach only, used by the mount-image orchestrator

Unmount strategies

Strategy Pipeline
UNMOUNT_FAIL_FAST normal unmount
UNMOUNT_RETRY normal unmount, retry 3x
UNMOUNT_FORCE normal → --force
UNMOUNT_LAZY normal → umount -l
UNMOUNT_FORCE_THEN_LAZY normal → force → lazy
UNMOUNT_RETRY_THEN_LAZY (default) retry 3x → lazy

Custom strategies

from unmount_image import umount_image, compose, retry, _unmount_normal, _unmount_force

strategy = compose(retry(_unmount_normal, attempts=5), _unmount_force)
umount_image('/dev/loop0', strategy=strategy)

License

GPL-3.0-only

Metadata

Release files for unmount-image 0.1.3

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

Source distribution (sdist)

Source distribution for unmount-image 0.1.3
File Size Uploaded Provenance Actions
unmount_image-0.1.3.tar.gz 22.3 kB With provenance Details for unmount_image-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unmount-image 0.1.3
File Interpreter ABI Platform Actions
unmount_image-0.1.3-py3-none-any.whl Python 3 none any Details for unmount_image-0.1.3-py3-none-any.whl

Total release size: 41.0 kB

Release files / unmount_image-0.1.3.tar.gz

Download URL unmount_image-0.1.3.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9679c1f61dd027fdbc2dfb9368c16e07048c87a56c06517d327634a4563006a9
BLAKE2b-256 checksum
How to use checksums
bf614a838315b61d0e073223c8d64dca3b6a5a1dd7be84a154317a141295ed75
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 16, 2026.

Transparency log

Release files / unmount_image-0.1.3-py3-none-any.whl

Download URL unmount_image-0.1.3-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6498ff4bf7fdd60690023592e4d4d2256c0266a7294d84e48d39526bb1f7d9f6
BLAKE2b-256 checksum
How to use checksums
7b995d10d2c05bce2253a4b847c37ffc10fc224d12858db3e5b619ed96253be0
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 16, 2026.

Transparency log

Security for unmount-image 0.1.3

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 unmount_image-0.1.3.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 16, 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