semvec/pypi-packages huggingface dataset:
wsslack.py 1.4.4
An APIwrapper for slack with python.
License: MIT

![PyPI](https://img.shields.io/pypi/v/wsslack.py)
![PyPI - License](https://img.shields.io/pypi/l/wsslack.py)
![PyPI - Downloads](https://img.shields.io/pypi/dm/wsslack.py)

# An API wrapper with Slack written in Python.

## Key feature
- Modern Pythonic API using `async` and `await`.
- API and interactive components of the platform  by utilizing websockets.

[//]: # (:warning: This is an alpha version.)

## Document for slack.py

- [**Startup**](https://slack-py.readthedocs.io/en/latest/startup.html)
- [**Core API**](https://slack-py.readthedocs.io/en/latest/api/index.html)
- [**Command extention**](https://slack-py.readthedocs.io/en/latest/commands/index.html)

## How to install

:warning: If you have `slack_bolt` installed, you cannot import this package. You may have file conflicts.

```shell
# stable
$ pip install wsslack.py

# latest
$ pip install git+https://github.com/peco2282/slack.py
```


## [Example](https://github.com/peco2282/slack.py/tree/main/examples)

#### [Event References](https://slack-py.readthedocs.io/en/latest/api/events.html)
```python
import slack

client = slack.Client(
    user_token="...",
    bot_token="...",
    token="..."
)

@client.event
async def on_message(message: slack.Message):
    if message.content.startswith("!"):
        await message.channel.send("Hello.")

@client.event
async def on_channel_create(channel: slack.Channel):
    await channel.send("Hello!")


client.run()
```
### **on_message**
![on_message](https://gyazo.com/cb37b7c67015f0f37a28d0d945dad3c4.png)

### **on_channel_create**
![on_channel_create](https://gyazo.com/40bec93c03343e43dee2180075716d39.png)

## Commands usage.

New style of messaging.
If you use app with commands..

```python
from slack import commands

bot = commands.Bot(..., prefix="!")

@bot.command(name="msg")
async def message(ctx: commands.Context, *args):
    await ctx.channel.send("message received!")

@bot.command()
async def ping(ctx: commands.Context, *args):
    await ctx.channel.send("pong!")
```

![msg](https://gyazo.com/38adfa4b18775e894d8c6f47d17d62f3.png)

![ping](https://gyazo.com/0f68ed0f4a125a2220782d703de0f24f.png)
btsmart 0.1.10
A package providing convenient access to the Fischertechnik BT-Smart Controller
License: MIT
Requires Python: >=3.7

========
BT-Smart
========

:Authors:
    Prof. Dr. Rainer Neumann

:Version: 0.1.10 of 2023/02/07

A small library that helps to build simple projects based on the Fischertechnik BT-Smart Controller
using Bluetooth LE.
The library uses the bleak libray to handle the BLE protocol and asyncio to access device features.

Installation
------------

pip install btsmart

Getting Started
---------------

Assume we have attached a Button to the first input of the Controller, as simple lamp to output 1 and a motor element to output 2.
Then we can use the library like this

.. code-block:: python

    import asyncio

    from btsmart import discover_controller, BTSmartController
    from btsmart import Button, Dimmer, MotorXS

    btn = Button()
    dim = Dimmer()
    motor = MotorXS()

    async def button_pressed():
        print("Button pressed")
        await asyncio.gather(
            dim.set_level(100),
            motor.run(level=100, time=0.5)
        )

    async def button_released():
        print("Button released")
        await dim.set_level(0)

    btn.on_press(button_pressed)
    btn.on_release(button_released)

    async def main():

        btSmart: BTSmartController = None
        try:
            btSmart = await discover_controller()
        except Exception:
            print("No controller found - please press the connect button on the device")
            return

        btn.attach(btSmart, 1)
        dim.attach(btSmart, 1)
        motor.attach(btSmart, 2)

        await btSmart.connect()

        await asyncio.sleep(20)

        await btSmart.disconnect()

    asyncio.run(main())