semvec/pypi-packages huggingface dataset:
replitdev 2.5.22
A library for interacting with features of repl.it
License: MIT
Requires Python: >=3.8,<4.0

# `replit` Python Module


The [Repl.it](https://repl.it/) Python environment does not require any platform-specific code, however, these optional utilities provide additional platform features in a simple and accessible way.

![compute](https://github.com/kennethreitz42/replit-py/blob/kr-cleanup/ext/readme.gif?raw=true)


*Example*: [Repl.it DB](https://docs.repl.it/misc/database) is an HTTP service, but an optional Python client (here!) is available.


### `>>> import replit`

This repository is the home for the `replit` Python package, which provides:

- A fully-featured database client for [Repl.it DB](https://docs.repl.it/misc/database). **[[docs]](https://example.com)**
- A **work in progress** Repl.it user profile lookup. **[[docs]](https://example.com)**
- A Flask application decorator for ensuring Repl.it Auth required on specific routes. **[[docs]](https://example.com)**

& other helpful toys and utilities, like...

- A simple audio library that can play tones and audio files!
- Some helpful functions for displaying ANSI colors within interactive terminal sessions.

### Open Source License

This library is licensed under the [ISC License](https://en.wikipedia.org/wiki/ISC_license) and is free for you to use, change, or even profit from!
only-pipe 2.0.0
A non-intrusive Python pipeline.
License: MIT

# Pipe.py

A non-intrusive Python pipeline. 

There are only pipeline. If you want more functional tools, you should look for another library.

## Install

```
pip install only-pipe
```

Or fetch from github

```
pip install git+https://github.com/abersheeran/only-pipe
```

## Usage

Use pipeline to pass data as a positional parameter to the next function:

```python
from pipe import F

range(10) | F(filter, lambda x: x % 2) | F(sum) == 25
```

Or you need to pass multiple parameters through the pipeline:

```python
from pipe import FF


def get_data():
    return 1, 2


get_data() | FF(lambda x, y: x + y) == 3
```

Use alias like follow code, you can use `map`/`filter`/`reduce` more conveniently:

```python
from functools import reduce
from pipe import F

Filter = F(F, filter)
Map = F(F, map)
Reduce = F(F, reduce)

range(100) | Filter(lambda x: x % 2) | Map(lambda x: x * x) | Reduce(lambda x, y: x + y)
```

## Set Global

Maybe you don't want to use `from pipe import F` in every file of the entire project, you can use the following code to set it as a global function, just like `min`/`max`/`sum`.

```python
import pipe

pipe.set_global(pipe.F, pipe.FF)
```

Maybe you also want to expose `functools.reduce` to the world, just like `map`/`filter`.

```python
import pipe
import functools

pipe.set_global(pipe.F, pipe.FF, functools.reduce)
```

## More

No more ~ This library has less than ten lines of valid code, but it is very effective. 

If you like it, please give a Star. 😀

This repository is released under the MIT. Do what you want!
dash-mqtt 0.0.2
dash_mqtt is a Dash component library for adding MQTT messaging functionality to your Dash apps.
License: MIT

# Dash with MQTT

`dash_mqtt` is a Dash component library for adding MQTT messaging functionality to your Dash apps.
It is essentially a wrapper around [MQTT.js](https://github.com/mqttjs/MQTT.js).

## Usage

Simple echo example using [emqx.io](https://www.emqx.io/) test MQTT broker. 

```

import dash_mqtt
import dash
from dash.dependencies import Input, Output, State
import dash_html_components as html
import dash_core_components as dcc

TEST_SERVER = 'broker.emqx.io'
TEST_SERVER_PORT = 8083
TEST_SERVER_PATH = 'mqtt'
MESSAGE_OUT_TOPIC = 'testtopic'
MESSAGE_IN_TOPIC = 'testtopic'

app = dash.Dash(__name__)

app.layout = html.Div([
    dash_mqtt.DashMqtt(
        id='mqtt',
        broker_url=TEST_SERVER,
        broker_port = TEST_SERVER_PORT,
        broker_path = TEST_SERVER_PATH,
        topics=[MESSAGE_IN_TOPIC]
    ),
    html.H1('MQTT echo'),
    html.P('MQTT echo server to ' + TEST_SERVER + ' on port ' + str(TEST_SERVER_PORT)),
    dcc.Input(
        id='message_to_send',
        placeholder='message to send',
        debounce = True),
    html.Button('Send',id='send'),
    html.Div(id='return_message')
])


@app.callback(
        Output('mqtt', 'message'),
        Input('send', 'n_clicks'),
        State('message_to_send', 'value')
    )
def display_output(n_clicks, message_payload):
    if n_clicks:
        return {
            'topic': MESSAGE_OUT_TOPIC,
            'payload' : message_payload
        }
    return dash.no_update
```

### NOTE

MQTT.js is running as an MQTT client in the browser in this implementation (As a React component as per typical Dash components). Subsequently, from [here](https://github.com/mqttjs/MQTT.js/issues/628#issuecomment-345412483):
1. There is no way for JavaScript running in browsers to open TCP sockets so "normal" MQTT is impossible in browser apps. 
2. To get around this limitation, **MQTT.js** uses **MQTT over WebSockets** instead when it detects it's running in a browser.

This means that you need to set the `broker_port` up to point at the MQTT-over-WebSockets port of the MQTT broker you are using, or if you are setting up your own broker server, turn on **MQTT-over-WebSockets** and expose a port.

---
## Help with developing the component

If you are want to adapt or help develop the component, refer [README_DEV.md](./README_DEV.md)

Currently written to suit author's needs - MQTT broker running in a DOcker Container on a local network for home IOT scenarion using [IOTStack](https://sensorsiot.github.io/IOTstack/), so have not put any effort into encrypted messaging.