semvec/pypi-packages huggingface dataset:
buffercache 1.0.2
a tool for data caching
License: MIT
Requires Python: >=3.0

![GitHub](https://img.shields.io/github/license/caibingcheng/buffercache)
![GitHub branch checks state](https://img.shields.io/github/checks-status/caibingcheng/buffercache/master)
![GitHub Release Date](https://img.shields.io/github/release-date/caibingcheng/buffercache)

buffercache is a python3 library. It provides utility methods for data caching.

buffercache supports Python 3.0+ only. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)

example:

```python
from buffercache import BufferCache as BC

set_data = ((1, 2, 3), None, "", "123", (), [], {})

def get(data, args):
    return data, args

bc = BC(timeout=0).set_getter(get)
for data in set_data:
    bc.update(data, {'key': data})
    print(bc.get())
```

Bugs can be reported to [https://github.com/caibingcheng/buffercache](https://github.com/caibingcheng/buffercache). The code can also be found there.
socketio-masonite-driver 0.1.0
Socket IO Broadcast Driver for Masonite
License: MIT
Keywords: masonite,socket-io,broadcast,masonite-socket-io-broadcast-driver

#### Project description

**What is Broadcast-SocketIO-Driver?**

It's an extra broadcast driver for masonite. It adds support for socketio. Because our emitter depends on Redis, installation of redis is required beforehand.

**Setup**

Install package using pip:

```shell
pip install socket-io-driver
```

Add provider inside config/providers.py.

```python
from socket_io_driver.SocketioBroadcastProvider import SocketioBroadcastProvider

PROVIDERS = [
    ...,
    # Application Providers
    SocketioBroadcastProvider,
]
```

**Storage Config**

Add following configuration inside config/broadcast.py.

```python
"socketio": {
    "host": env("SOCKET_HOST", "localhost"),
    "port": env("SOCKET_PORT", "6379"),
},
```

Add following keys in `.env`.

```
SOCKET_HOST=
SOCKET_PORT=
```

And finally update your broadcast driver in `.env`.

```
BROADCAST_DRIVER=socketio
```

**Example**

```python

from masonite.request import Request
from masonite import Broadcast

def your_function(request: Request, broadcast: Broadcast):
    channels = ['admin', 'chat'] # can be single or multiple channels
    broadcast.channel(channels, {
        'message': "Hello SocketIo!", # your data
    }, 'message') # event-name
```

Enjoy ;)