PYsfdisk
A Python API for linux sfdisk utility
Note: Module will work only on Linux OS’es, required executables used in this module: * sudo * lsblk * sfdisk * pxz * tar * partclone
Please ensure that you have installed above
Install
git clone https://github.com/beskidinstruments/python-sfdisk sudo pip install ./
Example
import pysfdisk
Create block device object for the disk
disk = pysfdisk.BlockDevice(path='/dev/nvme0n1')
Optionally, if not using root and sudo is available, use this
disk = pysfdisk.BlockDevice(path='/dev/nvme0n1', use_sudo=True)
Partitions information is automatically loaded
disk.get_partitions()['0'].uuid
403ACCB2-0B00-465F-B190-B59C45CFD860
Read partitions table.
disk.read_partition_table()
Create compressed archive from all partitions.
disk.run(mbr_filename="mbr_file", target_dir="/home/user/Desktop")
For more examples please use files in the example directory
License
pysfdisk is licensed under GPL v2.
Metadata
Release files for py-disk-imager 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py-disk-imager-1.0.1.tar.gz | 7.4 kB | Without provenance | Details for py-disk-imager-1.0.1.tar.gz |
Release files / py-disk-imager-1.0.1.tar.gz
| Download URL | py-disk-imager-1.0.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bba3259f6984229be0bcd3d40ed3b660a4f59d23deb0d7d3f6d73cbaff0de606
|
|
BLAKE2b-256 checksum How to use checksums |
3c624cc3b5346ab65635f27f58572e0128e871465f3479c095a76e2da6fc05b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.10
|
Security for py-disk-imager 1.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.