Disk image unmount and detach via udisksctl (Linux)
Project description
unmount-image
Disk image unmount and detach via udisksctl (Linux).
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 + detachdetach_image(device)— detach only (non-blocking)umount_inner(device)— unmount only, used by the mount-image orchestratordetach_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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unmount_image-0.1.1.tar.gz.
File metadata
- Download URL: unmount_image-0.1.1.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ac98c44ec7ecc67312e150136602633ef564ec39bb44636b9ab50fb5d9ab332
|
|
| MD5 |
3ec2acb4619b1c88a11ac6f0320f794d
|
|
| BLAKE2b-256 |
b7eb73c9516f2f8e9a6d128f423d63c46e81809b806da00074c3c6f7ad54c12e
|
Provenance
The following attestation bundles were made for unmount_image-0.1.1.tar.gz:
Publisher:
publish.yml on MBanucu/unmount-image
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unmount_image-0.1.1.tar.gz -
Subject digest:
6ac98c44ec7ecc67312e150136602633ef564ec39bb44636b9ab50fb5d9ab332 - Sigstore transparency entry: 1837195298
- Sigstore integration time:
-
Permalink:
MBanucu/unmount-image@dbf998e5b9f194745c92fd4214dfebce36b4b0a2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MBanucu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dbf998e5b9f194745c92fd4214dfebce36b4b0a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unmount_image-0.1.1-py3-none-any.whl.
File metadata
- Download URL: unmount_image-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f444fc3632a2c7c05bd044ca313725fac7d379f0e887f4866f99a98ce54ed19
|
|
| MD5 |
a1075badb87a93b1d1547d1e67a11f6a
|
|
| BLAKE2b-256 |
f722563202fb388b691d558ec4e0d9e950ca454f8385dce7e4ac73d7a2b9205f
|
Provenance
The following attestation bundles were made for unmount_image-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on MBanucu/unmount-image
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unmount_image-0.1.1-py3-none-any.whl -
Subject digest:
4f444fc3632a2c7c05bd044ca313725fac7d379f0e887f4866f99a98ce54ed19 - Sigstore transparency entry: 1837195477
- Sigstore integration time:
-
Permalink:
MBanucu/unmount-image@dbf998e5b9f194745c92fd4214dfebce36b4b0a2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MBanucu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dbf998e5b9f194745c92fd4214dfebce36b4b0a2 -
Trigger Event:
push
-
Statement type: