semvec/pypi-packages huggingface dataset:
airton-ac 2.2.0
Control an Airton AC device over LAN.
License: MIT
Requires Python: >=3.8

# airton-ac

[![tests](https://github.com/gpajot/airton-ac/workflows/Test/badge.svg?branch=main&event=push)](https://github.com/gpajot/airton-ac/actions?query=workflow%3ATest+branch%3Amain+event%3Apush)
[![version](https://img.shields.io/pypi/v/airton-ac?label=stable)](https://pypi.org/project/airton-ac/)
[![python](https://img.shields.io/pypi/pyversions/airton-ac)](https://pypi.org/project/airton-ac/)

Control an Airton AC device over LAN.
This requires having the [wifi module](https://eu.airton.shop/en/products/kit-module-wifi-pour-climatiseurs-airton-en-wifi-ready).

## Features
- asynchronous methods and transport
- persistent communication to the device
- automatic remote device state updates (remotes can still be used)
- configurable buffering for subsequent updates
- constraints between device commands
- Domoticz plugin using a dedicated thread

## Usage
See [local tuya requirements](https://github.com/gpajot/local-tuya#requirements) first to find device information.

Example usage:
```python
from local_tuya import DeviceConfig, ProtocolConfig
from airton_ac import ACDevice, ACFanSpeed


async with ACDevice(DeviceConfig(ProtocolConfig("{id}", "{address}", b"{key}"))) as device:
    await device.switch(True)
    await device.set_speed(ACFanSpeed.L2)
    await device.switch(False)
```

## Domoticz plugin
The plugin requires having fetched device information using instructions above.
Make sure to read [plugin instructions](https://www.domoticz.com/wiki/Using_Python_plugins) first.
> 💡 The Domoticz version should be `2022.1` or higher.

```shell
python -m pip install --upgrade airton-ac[domoticz]
python -m airton_ac.domoticz.install
```
Domoticz path defaults to `~/domoticz` but you can pass a `-p` option to the second command to change that:
```shell
python -m airton_ac.domoticz.install -p /some/other/path
```

Restart Domoticz and create a new Hardware using `Tuya Airton AC`. Fill in device information and add.
The hardware will create up to 5 devices to control the fan (all prefixed with hardware name):
- `power`: to turn on or off
- `set point`: to set the target temperature
- `temperature`: to record curent temperature as measured by the unit
- `mode`: to control operating mode
- `fan`: to control fan speed
- `eco`: toggle low heat when heating and eco-mode when cooling
- `light`: toggle display on the unit
- `swing`: toggle swing mode
- `sleep`: toggle sleep mode
- `health`: toggle health mode

You can customize the devices you want added in the hardware page.

All device names and levels can be changed once added as only IDs are used internally.
local-tuya-domoticz-tools 1.1.0
Tools to create a Domoticz plugin for local-tuya devices.
License: MIT
Requires Python: >=3.8

# local-tuya-domoticz-tools
Tools to create a Domoticz plugin for local-tuya devices.
> 💡 The Domoticz version should be `2022.1` or higher.

## Creating the plugin
To create a plugin, you will need to create 2 things.

### Plugin metadata
This is the XML header that is used to populate the plugin creation page in Domoticz.
You can create it using `local_tuya_domoticz_tools.PluginMetadata`.

### Starting the device.
To start the plugin, you need to create the device and register the units.

Check `local_tuya_domoticz_tools.plugin.plugin.OnStart` for the function signature.

Units should be created using `manager.register(...)`.

For a switch unit, it would look like:
```python
from typing import Dict

from local_tuya import DeviceConfig, ProtocolConfig
from local_tuya_domoticz_tools import UnitManager, switch_unit

from my_device import SwitchState, SwitchDevice


def on_start(
    protocol_config: ProtocolConfig,
    _: Dict[str, str],
    manager: UnitManager[SwitchState],
) -> SwitchDevice:
    device = SwitchDevice(config=DeviceConfig(protocol=protocol_config))
    manager.register(
        switch_unit(
            id_=1,
            name="power",
            image=9,
            command_func=device.switch,
        ),
        lambda s: s.power,
    )
    return device
```

### Units
Units represent a Domoticz device and is associated to a Domoticz hardware.

#### Manager
The role of the manager is to
- create/remove units: `register` method
- dispatch the commands from units: `on_command` method
- update units state: `update` method

#### Unit types
- [switch](./units/switch.py)
- [selector switch](./units/selector_switch.py)
- [temperature](./units/temperature.py) (accepts values preprocessor)
- [set point](./units/set_point.py)

For common units parameters, see the [base](./units/base.py).

## Installing the plugin
You should provide a script that will be used to install the plugin.
It would look like:
```python
from local_tuya_domoticz_tools import install_plugin, PluginMetadata

def on_start(...):
    ...


if __name__ == "__main__":
    install_plugin(
        metadata=PluginMetadata(...),
        on_start=on_start,
        import_path="my_device.domoticz",
    )
```

> 💡 Domoticz path defaults to `~/domoticz` a `-p` option can be passed to change that.

### Filtering units
You can automatically add an option to the plugin to filter created units.

To enable it, you need to implement `local_tuya_domoticz_tools.UnitId` and add all unit IDs, then simply pass it to the `install` function. `UnitManager.register` will handle device deletion.
rubixpro 1.0.4
Rubika Library Bot
License: MIT
Keywords: rubika,bot,robot,library,rubikalib,rubikalib.ml,rubikalib.ir,rubixpro,RubixPro,libraryrubixpro,Rubika,Python

How to import rubixpro's library is as follows:

<< from rubixpro import Client >>

An example:

from rubixpro import Client

bot = Client("Your Auth Account")
gif 23.3.0
The matplotlib Animation Extension
License: MIT
Requires Python: >=3.9
Keywords: gif,gifs,animation,PIL,pillow,matplotlib

<div align="center">
  <img alt="gif" src="https://raw.githubusercontent.com/maxhumber/gif/master/images/logo.png" height="200px">
</div>
<div align="center">
  <a href="https://calver.org/"><img src="https://img.shields.io/badge/calver-YY.MM.MICRO-22bfda.svg"></a>
  <a href="https://pypi.org/project/gif/"><img src="https://img.shields.io/pypi/v/gif.svg"></a>
  <a href="https://pepy.tech/project/gif"><img alt="Downloads" src="https://pepy.tech/badge/gif/month"></a>
</div>

### About

The [matplotlib](https://matplotlib.org/) Animation Extension

### Install & Import

```sh
pip install gif
```

```python
import gif
```

### Quickstart

```python
import gif
from random import randint
from matplotlib import pyplot as plt

x = [randint(0, 100) for _ in range(100)]
y = [randint(0, 100) for _ in range(100)]

# (Optional) Set the dots per inch resolution to 300
gif.options.matplotlib["dpi"] = 300

# Decorate a plot function with @gif.frame
@gif.frame
def plot(i):
    xi = x[i*10:(i+1)*10]
    yi = y[i*10:(i+1)*10]
    plt.scatter(xi, yi)
    plt.xlim((0, 100))
    plt.ylim((0, 100))

# Construct "frames"
frames = [plot(i) for i in range(10)]

# Save "frames" to gif with a specified duration (milliseconds) between each frame
gif.save(frames, 'example.gif', duration=50)
```


### Examples

| [![arrival.gif](images/arrival.gif)](examples/arrival.py)    | [![hop.gif](images/hop.gif)](examples/hop.py)          | [![phone.gif](images/phone.gif)](examples/phone.py) |
| ------------------------------------------------------------ | ------------------------------------------------------ | --------------------------------------------------- |
| [![seinfeld.gif](images/seinfeld.gif)](examples/seinfeld.py) | [![spiral.gif](images/spiral.gif)](examples/spiral.py) | [![heart.gif](images/heart.gif)](heart.py)          |


### Warning

Altair and Plotly are no longer supported in `22.5.0`+

Please use `pip install gif==3.0.0` if you still need to interface with these libraries