Skip to main content

Python bindings for GNU parted

Project description

pyparted
Python bindings for libparted
-----------------------------

OVERVIEW

pyparted is a set of native Python bindings for libparted. libparted is the
library portion of the GNU parted project. With pyparted, you can write
applications that interact with disk partition tables and filesystems.

The Python bindings are implemented in two layers. Since libparted itself
is written in C without any real implementation of objects, a simple 1:1
mapping of externally accessible libparted functions was written. This
mapping is provided in the _ped Python module. You can use that module if
you want to, but it's really just meant for the larger parted module.

_ped libparted Python bindings, direct 1:1: function mapping
parted Native Python code building on _ped, complete with classes,
exceptions, and advanced functionality.

The _ped module is written and maintained by hand. I chose to do this
rather than rely on a tool like SWIG or Pyrex for several reasons. Mostly
because I was the GNU parted maintainer, but also because libparted is sort
of complex. It's a lowlevel system tool and I found it doesn't translate
well in the tools I tried. This is nothing against those tools, I just
don't think libparted is ideal to go through SWIG or Pyrex. By writing my
own bindings, I can also find bugs in libparted that I may have overlooked
before. See the WHY file for more explanation as to why I wrote the
bindings by hand.


HISTORY

pyparted started life at Red Hat and continues there today. The main reason
for writing it was to let anaconda (the Red Hat installation program, now
used by RHEL and Fedora and many other distributions) interact with
libparted. Anaconda is written in Python, so native bindings made sense.

pyparted went through many rewrites, but the end result was always the same.
And incomplete API via Python with just enough provided for anaconda to do
its job.

The latest iteration of pyparted aims to be a complete API mapping and even
provide a nice set of classes so that people might want to integrate it in
to other installers or even write other applications (maybe a Python based
alternative to parted(8) or fdisk(8)).


EXAMPLES

Example code is provided in the examples directory. These may help provide a
gentle introduction to the usage concepts of pyparted. More examples are always
welcome, as are improved explanatory commentary for those that exist.


QUESTIONS

If you are reporting a pyparted failure in Fedora, it's most useful if
you file a bug at http://bugzilla.redhat.com/ against the appropriate
Fedora release you are using.

Alternatively, you can file bugs directly on the project page:
http://fedorahosted.org/pyparted/

If you just have questions about pyparted, you can email us directly
using the contact information in the AUTHORS file. We will do our best
to help you.

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

pyparted-3.10.7.tar.gz (94.7 kB view details)

Uploaded Source

File details

Details for the file pyparted-3.10.7.tar.gz.

File metadata

  • Download URL: pyparted-3.10.7.tar.gz
  • Upload date:
  • Size: 94.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyparted-3.10.7.tar.gz
Algorithm Hash digest
SHA256 78cbea4359782deb95efc074444909686952fcbfc19b97e15c06ca7dbfed8d2c
MD5 79ac5dd99eb32a8572e0c79eb4241664
BLAKE2b-256 2ca969f67f6d5d2fd80ef3d60dc5bef4971d837dc741be0d53295d3aabb5ec7f

See more details on using hashes here.

Supported by

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