Skip to main content

Cross-platform block device and mount point resolution from file paths

Project description

mount-resolve

PyPI version Python License OS

CI codecov

Downloads total Downloads/month Downloads/week

Cross-platform block device and mount point resolution from file paths.

Features

  • resolve_device — find the underlying block device for any file path (Linux /proc/partitions + /sys/dev/block, macOS hdiutil)
  • resolve_mount_point — find the mount point for any file path (Linux findmnt, macOS df)
  • resolve — combined call returning (device, mount_point, fstype)

Quick start

from mount_resolve import resolve, resolve_device, resolve_mount_point

# Combined — get device, mount point, and filesystem type in one call
info = resolve('/some/file')
# ('/dev/sda1', '/', 'ext4')

# Individual
device = resolve_device('/some/file')
mount = resolve_mount_point('/some/file')

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

mount_resolve-0.2.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mount_resolve-0.2.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file mount_resolve-0.2.0.tar.gz.

File metadata

  • Download URL: mount_resolve-0.2.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mount_resolve-0.2.0.tar.gz
Algorithm Hash digest
SHA256 86685d74331fabbb8a688336394169a806250490c9e05410f68114ba7ce0dfaa
MD5 b02d56cc37b058815c78b110a776a74d
BLAKE2b-256 51970e84f13fb172efa68e28429c211fe97b905bfe9015dd71996a0147c4e41f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mount_resolve-0.2.0.tar.gz:

Publisher: publish.yml on MBanucu/mount-resolve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mount_resolve-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mount_resolve-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mount_resolve-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f717f32e0cdd40196a7dcbe797b512ab336209056d10cd94be2d7c0fa1e35e63
MD5 cfa946e4a5509ece70c75be722369fb1
BLAKE2b-256 e6c4df7fa5c41d87f2e26afdee19995bc909536d6fefa59b43b97b76026ceb28

See more details on using hashes here.

Provenance

The following attestation bundles were made for mount_resolve-0.2.0-py3-none-any.whl:

Publisher: publish.yml on MBanucu/mount-resolve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page