A Python Library for Generating dbus-python Client Code
Function
This library contains a function, make_class, that consumes an XML specification of a D-Bus interface.
>>> Klass = make_class("Klass", spec)
This call yields a Python class, called Klass, with two static class members, “Methods” and “Properties”. The “Methods” class has a static method corresponding to each method defined in the interface. Each method takes a proxy object as its first argument followed by any number of keyword arguments, corresponding to the arguments of the method. The “Properties” class has a static class corresponding to every property defined in the interface. Each property class may have a static Get() or Set() method, depending on its attributes.
For example, assuming the interface defines a read only Version property, the following call should return a value.
>>> Klass.Properties.Version.Get()
However, since Version is a read only property, the following call should fail with an AttributeError.
>>> Klass.Properties.Version.Set("42")
Similarly, if the interface defines a method, Create, with one argument, name, a STRING, the following call should succeed.
>>> Klass.Methods.Create(proxy, name="name")
The Create method invokes the method on the proxy object, passing force, transformed into a dbus-python String type.
On the other hand, the invocation will raise a DPClientError exception if the method is called with an argument with an incorrect type as,
>>> Klass.Methods.Create(proxy, name=false)
or with an incorrect keyword as,
>>> Klass.Methods.Create(proxy, force=false)
or without all the necessary keywords as,
>>> Klass.Methods.Create(proxy)
Errors
This library exports one exception type, DPClientError. It constitutes a bug if an error of any other type is propagated during class generation or when the methods of the class are executed.
Dependencies
dbus-python
into-dbus-python
Requirements
This library is not compatible with Python 2.
Metadata
Release files for dbus-python-client-gen 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbus-python-client-gen-0.3.tar.gz | 5.3 kB | Without provenance | Details for dbus-python-client-gen-0.3.tar.gz |
Release files / dbus-python-client-gen-0.3.tar.gz
| Download URL | dbus-python-client-gen-0.3.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
628b5cd7c88a1170a3327d6e91717d3e54e068d5e30f772e05b666faa28321bb
|
|
BLAKE2b-256 checksum How to use checksums |
1058012abf16668f72f7a79edde39234549cb4d48af6532a53975ed30bfd1956
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dbus-python-client-gen 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.