Skip to main content

Read MBR and GPT partitions directly in python.

Project description

pyreadpartitions

Read MBR and GPT partitions directly in python.

Examples:

from pyreadpartitions import get_disk_partitions_info
with open('/dev/sda', 'rb') as fp:
    info = get_disk_partitions_info(fp)
    print(info.mbr)
    print(info.gpt)
from pyreadpartitions import show_disk_partitions_info
with open('/dev/sda', 'rb') as fp:
    show_disk_partitions_info(fp)

A console script is also available:

$ sudo cat /dev/sda | pyreadpartitions

or if you already have access to a file or directly to the disk:

# pyreadpartitions /dev/sda

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

pyreadpartitions-1.1.1.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

pyreadpartitions-1.1.1-py2.py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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