Skip to main content

A libudev binding

Project description

pyudev is a LGPL licensed, pure Python binding for libudev, the device and hardware management and information library for Linux. It supports almost all libudev functionality. You can enumerate devices, query device properties and attributes or monitor devices, including asynchronous monitoring with threads, or within the event loops of Qt, Glib or wxPython.

The binding supports CPython 3 and compatible versions of PyPy. It is tested against udev 151 or newer, earlier versions of udev as found on dated Linux systems may work, but are not officially supported.

Usage

Usage of pyudev is quite simply thanks to the power of the underlying udev library. Getting the labels of all partitions just takes a few lines:

>>> import pyudev
>>> context = pyudev.Context()
>>> for device in context.list_devices(subsystem='block', DEVTYPE='partition'):
...     print(device.get('ID_FS_LABEL', 'unlabeled partition'))
...
boot
swap
system

The website provides a detailed user guide and a complete API reference.

Support

Please report issues and questions to the issue tracker, but respect the following guidelines:

  • Check that the issue has not already been reported.

  • Check that the issue is not already fixed in the master branch.

  • Open issues with clear title and a detailed description in grammatically correct, complete sentences.

  • Include the Python version and the udev version (see udevadm --version) in the description of your issue.

Development

The source code is hosted on GitHub:

git clone git://github.com/pyudev/pyudev.git

Please fork the repository and send pull requests with your fixes or new features, but respect the following guidelines:

Request a New Release

I will be doing regular releases of this project every August and October, shortly after Fedora releases are branched from rawhide.

If you believe an extra release would help you in some way, please file an issue, explaining why you need the new release, and I expect I’ll put one up.

Why should you explain why you need the new release? Well, it is helpful to me, because pyudev is not at all part of my regular work, and I tend not to know very much about how it is used these days.

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

pyudev-0.24.4.tar.gz (56.1 kB view details)

Uploaded Source

Built Distribution

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

pyudev-0.24.4-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file pyudev-0.24.4.tar.gz.

File metadata

  • Download URL: pyudev-0.24.4.tar.gz
  • Upload date:
  • Size: 56.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyudev-0.24.4.tar.gz
Algorithm Hash digest
SHA256 e788bb983700b1a84efc2e88862b0a51af2a995d5b86bc9997546505cf7b36bc
MD5 2d2e6f68b60c3bf3ffc2b7c8df8d18ac
BLAKE2b-256 5e1d8bdbf651de1002e8b58fbe817bee22b1e8bfcdd24341d42c3238ce9a75f4

See more details on using hashes here.

File details

Details for the file pyudev-0.24.4-py3-none-any.whl.

File metadata

  • Download URL: pyudev-0.24.4-py3-none-any.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyudev-0.24.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b3b6b01c68e6fc628428cc45ff3fe6c277afbb5d96507f14473ddb4a6b959e00
MD5 0fa16e4255ce2141e8c3800b5704d41c
BLAKE2b-256 2a513dc0cd6498b24dea3cdeaed648568e3ca7454d41334d840b114156d7479f

See more details on using hashes here.

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