semvec/pypi-packages huggingface dataset:
matteridge 0.3.2
A Mattermost/XMPP gateway
Requires Python: >=3.11
Keywords: xmpp, gateway, bridge, instant messaging, chat, mattermost

# matteridge

A
[feature-rich](https://slidge.im/docs/matteridge/main/user/features.html)
[Mattermost](https://mattermost.com) to
[XMPP](https://xmpp.org/) puppeteering
[gateway](https://xmpp.org/extensions/xep-0100.html), based on
[slidge](https://slidge.im) and
[mattermost-api-reference-client](https://git.sr.ht/~nicoco/mattermost-api-reference-client).

[![CI pipeline status](https://ci.codeberg.org/api/badges/14070/status.svg)](https://ci.codeberg.org/repos/14070)
[![Chat](https://rooms.slidge.im:5281/muc_badge/support@rooms.slidge.im)](https://slidge.im/xmpp-web/#/guest?join=support@rooms.slidge.im)
[![PyPI package version](https://badge.fury.io/py/matteridge.svg)](https://pypi.org/project/matteridge/)




matteridge lets you chat with users of Mattermost without leaving your favorite XMPP client.

## Quickstart

```sh
docker run codeberg.org/slidge/matteridge \  # works with podman too
    --jid mattermost.example.org \  # can be whatever you want it to be
    --secret some-secret \  # must match your XMPP server config
    --home-dir /somewhere/writeable  # for data persistence
```

Use the `:latest` tag for the latest release, `:vX.X.X` for release X.X.X, and `:main`
for the bleeding edge.

If you do not like containers, other installation methods are detailed
[in the docs](https://slidge.im/docs/matteridge/main/admin/install.html).

## Documentation

Hosted on [codeberg pages](https://slidge.im/docs/matteridge/main/).

## Contributing

Contributions are **very** welcome, and we tried our best to make it easy
to start hacking on matteridge. See [CONTRIBUTING.md](./CONTRIBUTING.md).
upower-python-wrapper 0.1.2.2
Upower wrapper using dbus-next modern async aio
Requires Python: >=3.8

# upower-pywrapper

A UPower DBus wrapper using Dbus-next inspired by [wogscpar](https://github.com/wogscpar)'s upower-python.

## Functions

### Core
*   **`connect()`**: Connect to the System Bus. This is required before calling other methods.

### Manager
*   **`get_devices()`**: Enumerate all power devices and fetch their object paths.
*   **`get_display_device()`**: Fetch the object path of the composite display device.
*   **`get_critical_action()`**: Get the configured critical action for the system.
*   **`get_manager_status()`**: Fetch global power manager status, including:
    *   `on_battery`: Boolean indicating if running on battery.
    *   `lid_closed`: Boolean indicating if lid is closed.
    *   `daemon_ver`: The UPower daemon version.
    *   `lid_present`: Boolean indicating if a lid is present.
*   **`is_lid_present()`**: Check if the system has a lid.
*   **`is_lid_closed()`**: Check if the lid is closed.
*   **`on_battery()`**: Check if the device is currently running on battery power.
*   **`is_present(obj)`: Check if device has batteries
### Wakeups
*   **`has_wakeup_capabilities()`**: Check if the system supports wakeup capabilities.
*   **`get_wakeup_data()`**: Get data regarding system wakeups.
*   **`get_wakeup_total()`**: Get the total number of wakeups.

### Device
These methods typically require a device object path (string) as an argument.

*   **`get_device_percentage(obj)`**: Returns the remaining battery percentage for the specified device.
*   **`is_charging(obj)`**: Check if the specified device is currently charging.
*   **`get_full_device_information(obj)`**: Returns a comprehensive dictionary of device information (e.g., Capacity, Energy, Model, Vendor, Voltage, etc.).
*   **`get_device_state(obj)`**: Returns the readable state string of the device (e.g., "Charging", "Discharging", "Full").

## Example

#### Quick example on how to fetch remaining battery percentage:

```python
import asyncio
from upower_api import UPowerWrapper


async def main():
    mybus = UPowerWrapper()
    await mybus.connect()

    disp_device = await mybus.get_display_device()
    percentage = await mybus.get_device_percentage(disp_device)
    print(percentage)

if __name__ == "__main__":
    asyncio.run(main())

```