Skip to main content

Introduction

Reparted is my attempt at learning python ctypes module to create bindings for c api’s so use it at your own risk. I was a bit confused on the way parted and pyparted interface works, my aim was to create a simple interface. It does not have the full set of features parted has to offer, only enough to create and delete partitions and set the labels. It has been tested using python 2.7 and libparted 3.0. Feel free to check the code and point out enhancements. For any questions my email is rq.sysadmin@gmail.com, have fun!

Downloads

You can download the package from PyPi:

http://pypi.python.org/pypi/reparted/

or checkout reparted on github:

http://github.com/xzased/reparted

Installation

You can get reparted using pip to install it from PyPI:

pip install -U reparted

Documentation

You can view the documentation and quickstart guide here:

http://xzased.github.com/reparted

1.2 Release Notes

Changes from 1.1

There are no syntax changes in this version (and hopefully never will), so code working on previous versions should work just fine, however, there are some minor structure changes that improve readability and fixed weird behavior. The Partition class has been moved to its own module partition.py, this will not affect you if you are importing like:

from reparted import *

Other than that, there are only the following bugfixes and cool additions:

Bug Fixes

  • Failed to add primary partition after extended partition was created in msdos disks.

  • Reparted would segfault if attempting to add logical partitions on non-msdos disks.

  • Partition types were not being checked against disk types and extended partitions.

Additions

  • Basic operation support for size class.

  • Device, Disk and Partition instances provide a size method.

  • Disk class now provides usable_free_space and total_free_space methods.

  • Logical partitions are added automatically to extended partitions (you can still provide the start and/or end sector if you want to).*

1.1 Release Notes

Bug Fixes

  • No error was raised when calling Device with an invalid path.

  • Calculations in to method from Size class were wrong.

  • Reparted would segfault when initializing a fresh disk and call certain disk methods.

Additions

  • Custom exceptions.

  • Nice documentation.

Metadata

Release files for reparted 1.2

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

Source distribution (sdist)

Source distribution for reparted 1.2
File Size Uploaded Provenance Actions
reparted-1.2.tar.gz 126.8 kB Without provenance Details for reparted-1.2.tar.gz

Release files / reparted-1.2.tar.gz

Download URL reparted-1.2.tar.gz
Size 126.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e4a14696faee827535b9625c18ec5eab3e31ac60fd24790f4b1add2e3c815a11
BLAKE2b-256 checksum
How to use checksums
cb71b43387ade539a0b6f4d4deb6650f0e9983185bb4b3f1468e20b6fb733e0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for reparted 1.2

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.

Release history Release notifications | RSS feed

This release

1.2 This release

1 release file No provenance

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