semvec/pypi-packages huggingface dataset:
CheeseAPI-Websocket 1.1.1
一款基于CheeseAPI的升级款Websocket插件。
Keywords: CheeseAPI, websocket

# **CheeseAPI_Websocket**

## **介绍**

一款基于[CheeseAPI](https://github.com/CheeseUnknown/CheeseAPI)的升级款Websocket插件，它能够解决在多worker下websocket的通讯问题，前提是需要引入redis。

## **安装**

系统要求：Unix，例如Linux、Mac等；不支持Windows，若有需要请使用Windows的WSL运行程序。

```bash
pip install CheeseAPI_Websocket
```

## **使用**

CheeseAPI_Websocket是[CheeseAPI](https://github.com/CheeseUnknown/CheeseAPI)的一款插件，它需要依赖于[CheeseAPI](https://github.com/CheeseUnknown/CheeseAPI)才能运行。

默认情况下，它会连接到本地默认端口下的redis db0。

```python
import threading, time

from CheeseAPI import app, WebsocketClient, Response
from CheeseAPI_Websocket import websocket

app.modules.append('CheeseAPI_Websocket') # 加入模块

@app.route.websocket('/')
class Test(WebsocketClient):
    ...

# 创建一个线程，在非协程环境下发送Websocket
@app.handle.server_afterStartingHandle
def test():
    def test0():
        while True:
            websocket.send('/', '你好')
            time.sleep(1)
threading.Thread(target = test, daemon = True).start()

# 在协程环境下发送Websocket
@app.route.post('/websocket')
async def test1():
    await websocket.async_send('/', '世界')
    return Response()

app.run()
```

请注意下列情况：

1. 若传输的数据量过大，请使用原生的send方法，以避免为redis带来过大的负担。

2. 多个不同数据源的服务器连接到同一个redis数据库，会导致websocket消息错乱。

## **Websocket**

```python
from CheeseAPI_Websocket import websocket
```

### **`websocket.host: str = 'localhost'`**

连接的redis host。

### **`websocket.port: int = 6379`**

连接的redis端口。

### **`websocket.db: int = 0`**

连接的redis数据库。

### **`websocket.send(path: str, message: str | bytes | dict | list, sid: str | List[str] | Literal['*'] = '*')`**

发送消息，支持广播。

### **`await websocket.async_send(path: str, message: str | bytes | dict | list, sid: str | List[str] | Literal['*'] = '*')`**

发送消息，支持广播。

## **`websocket.close(path: str, sid: str | List[str] | Literal['*'] = '*')`**

关闭连接，支持广播。

## **`await websocket.async_close(path: str, sid: str | List[str] | Literal['*'] = '*')`**

关闭连接，支持广播。
localpost 0.4.0
Consumers framework for different message brokers & simple in-process task scheduler
Requires Python: >=3.10
Keywords: scheduler, cron, message brokers, sqs, kafka, nats, rabbitmq

# localpost

Simple in-process task scheduler & consumers framework for different message brokers.

## Scheduler

TBD

## Consumers

TBD

## Hosting

TBD
wowool-infobox 1.2.0
Wowool Infobox
Requires Python: >=3.11

# Description

The InfoBox application enrich annotation with wikipedia infobox information.## Examples

You will need to install the english language module to run the sample. `pip install wowool-english` 

### Enrich your data.

using the wow cli:

```console
wow -p "english,entity,infobox.app" -i "I saw Joe Biden in the street."
```

or the api:


```python
from wowool.sdk import Pipeline
from json import dumps

pipeline = Pipeline("english,entity,infobox.app")
doc = pipeline("I saw Joe Biden in the street.")
for entity in doc.entities:
    print(dumps({**entity}, indent=2))

```

As we see we get all the attributes found in the wikipedia from that person.

results:

```json
{
  "uri": "Person",
  "literal": "Joe Biden",
  "stem": "Joe Biden",
  "canonical": "Joe Biden",
  "country": "USA",
  "descriptor": "President,Democratic President,voter,Democrat,donor,man,candidate,reporter,lead President,President - elect",
  "family": "Biden",
  "gender": "male",
  "given": "Joe",
  "political_party": "democratic",
  "position": "President,president,vice president,Democratic President,reporters,lead President,President - elect,politician,lawyer,author",
  "position_level": "communication",
  "shortdescription": "President of the United States since 2021",
  "theme": "politics",
  "wiki_type": "Person"
}
```



## License

In both cases you will need to acquirer a license file at https://www.wowool.com

### Non-Commercial

    This library is licensed under the GNU AGPLv3 for non-commercial use.  
    For commercial use, a separate license must be purchased.  

### Commercial license Terms

    1. Grants the right to use this library in proprietary software.  
    2. Requires a valid license key  
    3. Redistribution in SaaS requires a commercial license.
shaksz 0.1.4
All coding and design solutions as package
Requires Python: >=3.6

# shaksz
        
        All coding and design solutions as package.
        
        
        [![build-release-package](https://github.com/vermavarun/shaksz/actions/workflows/build.yaml/badge.svg)](https://github.com/vermavarun/shaksz/actions/workflows/build.yaml)
        
        # How to install 💫
        
        ⭐ __PIP:__ ⭐
        
        ```code
        pip install shaksz
        ```
        
        __GitHub(ssh)__:
        ```code
        pip install git+ssh://git@github.com/vermavarun/shaksz
        ```
        
        __GitHub(https)__:
        ```code
        pip install git+https://github.com/vermavarun/shaksz.git
        ```
        
        __GitHub(Token)__:
        ```code
        pip install git+https://<TOKEN>@github.com/vermavarun/shaksz.git
        ```
        
        
        # Consumption ⚙️
        ```python
            import shaksz
        
            result = shaksz.leetcode.twoSum([2, 7, 11, 15], 9)
        
            print(result)
        
            result = shaksz.codeforces._4a(input_data)
        
            print(result)
        ```