Skip to main content

A libudev binding

Project description

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:

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.23.2.tar.gz (87.2 kB view details)

Uploaded Source

Built Distribution

pyudev-0.23.2-py3-none-any.whl (63.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyudev-0.23.2.tar.gz
  • Upload date:
  • Size: 87.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.10.2

File hashes

Hashes for pyudev-0.23.2.tar.gz
Algorithm Hash digest
SHA256 32ae3585b320a51bc283e0a04000fd8a25599edb44541e2f5034f6afee5d15cc
MD5 903ce95dc8dd787014f224e2674e406f
BLAKE2b-256 f8faae6c1a1a75f19560bbd875a579b2ca9b32deeae6a4c4a1997f4ec69a013e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyudev-0.23.2-py3-none-any.whl
  • Upload date:
  • Size: 63.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.10.2

File hashes

Hashes for pyudev-0.23.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50d94bef0669f9aabd323a2259be67e8d49b9ebab9eae27b2cf8262767f9a2ae
MD5 e7fafd67c92d5a0713cbb459555cde1b
BLAKE2b-256 b7954c67255c65da9c939903cb95c57bd1ad7c920a7b711066aaa56cd7d149ab

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