dbussy | Python binding for D-Bus using asyncio

 by   ldo Python Version: 1.3 License: LGPL-2.1

kandi X-RAY | dbussy Summary

kandi X-RAY | dbussy Summary

dbussy is a Python library. dbussy has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has low support. You can install using 'pip install dbussy' or download it from GitLab, GitHub, PyPI.

D-Bus is a high-level interprocess communication protocol. It also provides a standard daemon, that is included with the main Linux desktop environments, that implements a set of standard “buses”: a “system” bus that is created at system boot time, and a “session” bus that belongs to each user who logs into one of these desktop environments. Processes can register their services on one of these buses—​the system bus for systemwide access, or the session bus for per-user access—​where other processes can find them by name and connect to them. Or they can accept connections on entirely separate networking sockets, without any dependency on the D-Bus daemon. libdbus, the reference implementation for the low-level D-Bus protocol, supports both modes of operation. D-Bus is based around the concept of passing messages conforming to a standard, extensible format. Messages are of four types: * a “method call” * a “method return” (normal response to a method call) * an “error” (abnormal response to a method call) * a “signal” notification. A method-call message is how one process requests a service of another process via D-Bus; the usual response would be a method-return message in the other direction indicating the completion status of the service being performed; it is also possible to send method-call messages without expecting a reply. If there was something wrong with the method-call message (e.g. inappropriate parameters, lack of permissions), then the response would be an error message. One could also send a method-return with information indicating a failure to perform the requested service; presumably the choice between the types of response is that an error return indicates a condition that is not supposed to happen—​a bug in the requesting program. Signal messages are sent as notifications of interesting events pertaining to the current session (for the session bus) or the entire system (for the system bus). They are usually not sent to a specific destination, but can be picked up by all interested processes on the bus. There are no replies to signals; if the receiving process cannot or will not process a particular message, it simply ignores it. Messages optionally include the following information: * a destination “bus name” indicating the process that is to receive the message (this is not the name of the bus, but the name of a process on the bus) * an “object path” which looks like a POSIX absolute file name (always beginning with a slash and never ending with a slash, except for the root object “/”); the meaning of this is up to the receiving process, but it is intended to indicate some object within the hierarchy exposed by the process * an “interface name” which identifies the particular message protocol * a “method name” which identifies the particular function to be performed within that interface. Bus names and interface names look like domain names with the components reversed, so the top level is at the beginning. If you are familiar with package names in Java, they take the same form, and with the same intent: to reduce the chance of name conflicts. D-Bus also includes an extensive, but not extensible, type system for encoding data in a message. This data represents arguments to the method call or signal, return results for a method return or the error name and message for an error. A message contains a sequence of 0, 1 or more items of such data, each of which can be of various types: “basic” types (e.g. integer, float, string) or “container” types (structs, arrays, dictionaries) which in turn contain more values, each of which in turn can be of a basic or (recursively) another container type. A “signature” is a string encoding the type of a value, or sequence of values; there is also a “variant” type, which means the type of the value is encoded dynamically with the value itself, separate from the signature. The importance of type signatures is really up to the particular programs that are trying to communicate: some might insist on values exactly matching the expected type signature, whereas others might be more lenient. For example, while the D-Bus type system specifies different basic types for different sizes of integers of signed or unsigned varieties, most Python code will probably not care about the specific distinctions, and treat all these values as of type “int”.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              dbussy has a low active ecosystem.
              It has 71 star(s) with 18 fork(s). There are 8 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 4 open issues and 33 have been closed. On average issues are closed in 39 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of dbussy is 1.3

            kandi-Quality Quality

              dbussy has 0 bugs and 124 code smells.

            kandi-Security Security

              dbussy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              dbussy code analysis shows 0 unresolved vulnerabilities.
              There are 2 security hotspots that need review.

            kandi-License License

              dbussy is licensed under the LGPL-2.1 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              dbussy releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 7307 lines of code, 564 functions and 3 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed dbussy and discovered the below as its top functions. This is intended to give you an instant insight into dbussy implemented functionality, and help decide if they suit your requirements.
            • dispatch message interface
            • Matches a message .
            • Attach an asyncio event loop .
            • Define an interface class .
            • Called when an object has been added .
            • Unformat a rule .
            • Return a string representation of the object .
            • Append objects to the message .
            • Call a function asynchronously .
            • Parse the signature string .
            Get all kandi verified functions for this library.

            dbussy Key Features

            No Key Features are available at this moment for dbussy.

            dbussy Examples and Code Snippets

            No Code Snippets are available at this moment for dbussy.

            Community Discussions

            Trending Discussions on dbussy

            QUESTION

            Active BLE Scanning (BlueZ) - Issue with DBus
            Asked 2021-Mar-04 at 17:38

            I've started a project where I need to actively (all the time) scan for BLE Devices. I'm on Linux, using Bluez 5.49 and I use Python to communicate with dbus 1.10.20). I' m able to start scanning, stop scanning with bluetoothctl and get the BLE Advertisement data through DBus (GetManagedObjects() of the BlueZ interface). The problem I have is when I let the scanning for many hours, dbus-deamon start to take more and more of the RAM and I'm not able to find how to "flush" what dbus has gathered from BlueZ. Eventually the RAM become full and Linux isn't happy.

            So I've tried not to scan for the entire time, that would maybe let the Garbage collector do its cleanup. It didn't work.

            I've edited the /etc/dbus-1/system.d/bluetooth.conf to remove any interface that I didn't need

            ...

            ANSWER

            Answered 2021-Mar-04 at 06:29

            Indeed, Bluez flushes memory when you stop discovering. So in order to scan continuously you need start and stop the discovery all the time. I discover for 6 seconds, wait 1 second and then start discovering for 6 seconds again...and so on. If you check the logs you will see it deletes a lot of stuff when stopping discovery.

            Source https://stackoverflow.com/questions/66465459

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install dbussy

            You can install using 'pip install dbussy' or download it from GitLab, GitHub, PyPI.
            You can use dbussy like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install DBussy

          • CLONE
          • HTTPS

            https://github.com/ldo/dbussy.git

          • CLI

            gh repo clone ldo/dbussy

          • sshUrl

            git@github.com:ldo/dbussy.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link