Debian Codegraph @

doc/index.rst

raw
1 pyudev -- pure Python libudev_ binding
2 ======================================
3
4 pyudev |release| (:doc:`changes`, :doc:`installation <install>`)
5
6 pyudev is a :doc:`LGPL licenced <licencing>`, pure Python_ 3 binding to
7 libudev_, the device and hardware management and information library of Linux.
8
9 Almost the complete libudev_ functionality is exposed. You can:
10
11 * Enumerate devices, filtered by specific criteria (:class:`pyudev.Context`)
12 * Query device information, properties and attributes,
13 * Monitor devices, both synchronously and asynchronously with background
14 threads, or within the event loops of Qt (:mod:`pyudev.pyqt5`, :mod:`pyudev.pyqt4`,
15 :mod:`pyudev.pyside`), glib (:mod:`pyudev.glib`) and wxPython
16 (:mod:`pyudev.wx`).
17
18
19 Documentation
20 -------------
21
22 Thanks to the power of libudev_, usage of pyudev is very simple. Getting the
23 labels of all partitions just takes a few lines:
24
25 >>> import pyudev
26 >>> context = pyudev.Context()
27 >>> for device in context.list_devices(subsystem='block', DEVTYPE='partition'):
28 ... print(device.get('ID_FS_LABEL', 'unlabeled partition'))
29 ...
30 boot
31 swap
32 system
33
34 A user guide gives an introduction into common operations and concepts of
35 pyudev, the API documentation provides a detailed reference:
36
37 .. toctree::
38 :maxdepth: 2
39
40 install
41 guide
42 api/index
43
44
45 Support
46 -------
47
48 Please report issues, bugs and questions to the `issue tracker`_, but respect
49 the following guidelines:
50
51 - Check that the issue has not already been reported.
52 - Check that the issue is not already fixed in the ``master`` branch.
53 - Open issues with clear title and a detailed description in grammatically
54 correct, complete sentences.
55 - Include the Python version and the udev version (see ``udevadm --version``) in
56 the description of your issue.
57
58
59 .. _development:
60
61 Development
62 -----------
63
64 The source code is hosted on GitHub_::
65
66 git clone https://github.com/lunaryorn/pyudev.git
67
68 If you want to contribute to pyudev, please read the guidelines for
69 contributions and the testsuite documentation.
70
71 .. toctree::
72 :maxdepth: 2
73
74 contribute
75 tests/index
76
77
78 Endorsements
79 ------------
80 If you're using pyudev and want to say something about it please add yourself
81 to the endorsements page.
82
83 .. toctree::
84 :maxdepth: 1
85
86 endorsements
87
88
89 Other reading
90 -------------
91
92 .. toctree::
93 :maxdepth: 1
94
95 changes
96 licencing
97
98
99 .. _Python: http://www.python.org/
100 .. _libudev: http://www.freedesktop.org/software/systemd/man/libudev.html
101 .. _librelist.com: http://librelist.com/
102 .. _list archives: http://librelist.com/browser/pyudev/
103 .. _issue tracker: https://github.com/lunaryorn/pyudev/issues
104 .. _GitHub: https://github.com/lunaryorn/pyudev