semvec/pypi-packages huggingface dataset:
rbwr 0.2.0
Rather be writing Rust.
Requires Python: >=3.13
Keywords: enum, rust, sum, tagged, types, union

# `rbwr`

Rather be writing Rust

---

A small Python library providing sum types that play well with existing
typechecking PEPs and should work out-of-the-box with any good typechecker,
such as Pyright.

For the documentation, look [here][docs]. To see how this scheme for encoding
sum types was conceived, check out [this blog post][blog_post].

[docs]: https://charles.gitlab-pages.computer.surgery/rbwr/
[blog_post]: https://charles.gitlab-pages.computer.surgery/blog/python-has-sum-types.html
pydaikin-custom 2.16.0
Python Daikin HVAC appliances interface
Requires Python: >=3.11

![PyPI - License](https://img.shields.io/pypi/l/pydaikin?color=green)
![PyPI - Downloads](https://img.shields.io/pypi/dw/pydaikin?label=downloads&logo=pypi&logoColor=white)
![PyPI - Version](https://img.shields.io/pypi/v/pydaikin?label=version&logo=pypi&logoColor=white)

[![Test Python package](https://github.com/fredrike/pydaikin/actions/workflows/pytest.yml/badge.svg)](https://github.com/fredrike/pydaikin/actions/workflows/pytest.yml)
[![Pylint](https://github.com/fredrike/pydaikin/actions/workflows/pylint.yml/badge.svg)](https://github.com/fredrike/pydaikin/actions/workflows/pylint.yml)
[![codecov](https://codecov.io/github/fredrike/pydaikin/graph/badge.svg?token=DFEYF4L0J2)](https://codecov.io/github/fredrike/pydaikin)
![GitHub Pull Requests](https://img.shields.io/github/issues-pr/fredrike/pydaikin?logo=github)
![GitHub Issues](https://img.shields.io/github/issues/fredrike/pydaikin?logo=github)

PyDaikin is a standalone program and a library that interface AirConditioners from Daikin.

Currently the following Daikin WiFi modules are supported:

* BRP069Axx/BRP069Bxx/BRP072Axx
* BRP15B61 aka. AirBase (similar protocol as BRP069Axx)
* BRP072B/Cxx (needs https access and a key)
* SKYFi (different protocol, have a password)
* BRP devices with firmware version 2.8.0 (different API structure) - new in version 2.16.0

The integration was initially built by Yari Adan, but lately have been taken over by Fredrik Erlandsson.

Here is a simple example code for connecting to a  "BRP069" style AC:
```python
import logging, asyncio
from pydaikin.daikin_base import Appliance
from pydaikin.factory import DaikinFactory

logging.basicConfig(level=logging.DEBUG, format='%(levelname)s: %(message)s')

async def testDaikin():
    device: Appliance = await DaikinFactory("10.0.0.1")
    device.show_sensors()

asyncio.run(testDaikin())
```

## Firmware Version 2.8.0 Support

Firmware version 2.8.0 uses a different API structure compared to earlier firmware versions. The library now automatically detects the firmware version and uses the appropriate communication method. Confirmed working with:

* FTKM20YVMA with firmware version 2.8.0
* FTXM46WVMA with firmware version 2.8.0
* FTXV80WVMA with firmware version 2.8.0

If you have a device with firmware 2.8.0 that's not working correctly, please open an issue with the device model and provide logs when using the debug mode.
py2pyd 0.1.4
Cross-platform .py file to shared library(dll) compiler, .pyd (Windows) or .so (Linux).
Requires Python: >=3.6

# py2pyd

**py2pyd** is a fully cross-platform CLI tool, to compile Python scripts (`.py`) into `.pyd` shared library on **Windows** or
 `.so` on **Linux**, with only the `.py` file to compile as argument.

**Installation**
`bash|cmd :`
```bash|cmd

pip install py2pyd

```

**Usage:**

To compile a Python file to a `.pyd` shared library on Windows
 or `.so` on Linux:

```python

py2pyd myscript.py

```

**output:**

The compiled `.pyd` or `.so` shared library
django-allauth-suap 0.1.2
SUAP social login provider for django-allauth
Requires Python: >=3.8

# Social Login Provider do SUAP para o django-allauth

Esse projeto permite a autenticação OAuth2 do [SUAP](https://portal.suap.ifrn.edu.br/) para projetos [Django](https://www.djangoproject.com/) que usem a biblioteca [django-allauth](https://docs.allauth.org/en/latest/).

## Instalação
- Instale e configure o Django Allauth conforme a [documentação](https://docs.allauth.org/en/latest/)
- Instale o pacote `django-allauth-suap`:
```
pip install django-allauth-suap
```
### `settings.py`
- Adicione ao `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
    ...
    # Padrão do allauth
    allauth
    allauth.account
    allauth.socialaccount

    # SUAP Provider
    allauth_suap
    ...
]
```
- Não esqueça das demais configurações do `allauth` em `AUTHENTICATION_BACKENDS`, `MIDDLEWARE` e `urls.py`.
- Gere as chaves de API do SUAP em https://suap.ifrn.edu.br/admin/api/aplicacaooauth2/ com as seguintes informações:
```
Name: Nome do App
Authorization grant type: Authorization code
# Em desenvolvimento usar o exemplo abaixo e em produção ajustar o domínio, porta e protocolo (HTTPS), mantendo o endpoint.
Redirect URIs:
http://127.0.0.1:8000/accounts/suap/login/callback/
Client type: Confidential # Já que as chaves ficam seguras no back-end.
Algorithm: No OIDC support
Ativo: check
```
- Guarde o `Client secret` pois não será mostrado novamente;
- Adicione ao `settings.py` do projeto:
```python
SOCIALACCOUNT_PROVIDERS = {
    "suap": {
        # Talvez funcione para outras instituições apenas
        # mudando a URL, mas só foi testado no IFRN.
        "SUAP_URL": "https://suap.ifrn.br",
        # Escopo básico. Para acessar dados como CPF, adicione
        # "documentos_pessoais".
        "SCOPE": ["identificacao", "email"]
        "APP": {
            # IMPORTANTE! Use algum mecanismo para ler esses valores
            # de um .env, por exemplo.
            # Não suba suas chaves para o repositório!!
            "client_id": "seu_client_id",
            "secret": "seu_client_secret",
        },
    }
}
```

## Uso
- O Provider apenas recupera as informações básicas do usuário padrão Django: `username` (matrícula), `email`, `first_name` e `last_name`.
- Caso seja necessário recuperar mais dados (ex. cpf, campus), crie um SocialAcountAdapter customizado e use os métodos disponíveis, conforme a [documentação do allauth](https://docs.allauth.org/en/latest/socialaccount/adapter.html).

## Exemplos
- O projeto [Paca CMS](https://github.com/IFRN-SPP/paca-cms) usa esse pacote.

## Contribuições
O projeto está aberto a contribuições, inclusive para adequações que permitam o funcionamento com outras instituições que usem o SUAP.

## Referências
- [Documentação da API SUAP](https://suap.ifrn.edu.br/api/docs/)
- [suapi](https://github.com/IFRN/suapi)
- [suap-api-php](https://github.com/IFRN/suap-api-php)
- [cliente_suap_django](https://github.com/ifrn-oficial/cliente_suap_django)
- [cliente_suap_javascript](https://github.com/dvcirilo/cliente_suap_javascript)