Skip to main content

pyudev

https://secure.travis-ci.org/pyudev/pyudev.png?branch=develop

http://pyudev.readthedocs.org

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:

Metadata

Release files for pyudev 0.23.1

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

Source distribution (sdist)

Source distribution for pyudev 0.23.1
File Size Uploaded
pyudev-0.23.1.tar.gz 87.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyudev 0.23.1
File Interpreter ABI Platform
pyudev-0.23.1-py3-none-any.whl Python 3 none any Details

Total release size: 151.3 kB

Release files / pyudev-0.23.1.tar.gz

Download URL pyudev-0.23.1.tar.gz
Size 87.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1512e5504cb7effd4c2903c9d0450ff92dfc3a2883c411a86b804a2f9a63f8c1
BLAKE2b-256 checksum
How to use checksums
f399d09ba5fa2fcbefba2993ed876f637ca23109bd89c606f84a4aec70dab5de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

Release files / pyudev-0.23.1-py3-none-any.whl

Download URL pyudev-0.23.1-py3-none-any.whl
Size 63.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f5d71b527211a6d74c311a8a21449ad91d34af260a515efb0389e041fc6fc6b
BLAKE2b-256 checksum
How to use checksums
12d7e9054fc2ead034144c7838aec5cb74a5d5f66e2aa88bd6bab78f2415e4b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
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