semvec/pypi-packages huggingface dataset:
indipyclient 0.9.1
Pure python package, providing a set of classes which can be used to create scripts or clients to control remote instruments using the INDI protocol.
Requires Python: >=3.10
Keywords: indi, client, astronomy, instrument

# indipyclient

This indipyclient package provides classes used to communicate to an INDI server. In particular your script can import and create an instance of the 'IPyClient' class.

INDI - Instrument Neutral Distributed Interface.

See https://en.wikipedia.org/wiki/Instrument_Neutral_Distributed_Interface

INDI is often used with astronomical instruments, but is a general purpose protocol which can be used for any instrument control.

The INDI protocol defines the format of the data sent, such as light, number, text, switch or BLOB (Binary Large Object). The client takes the format of switches, numbers etc., from the protocol.

The IPyClient object has an asyncrun() coroutine method which needs to be awaited, typically gathered with your own tasks. The client transmits a 'getProperties' request (this indipyclient package does this for you on connecting).

The server replies with definition packets (defSwitchVector, defLightVector, .. ) that define the format of the instrument data.

The indipyclient package reads these, and its IPyClient instance becomes a mapping of the devices, vectors and members.

For example, if ipyclient is your instance of IPyClient:

ipyclient[devicename][vectorname][membername] will be the value of a particular parameter.

A 'vector' is a collection of members, so a switch vector may have one or more switches in it.

As the instrument produces changing values, the server sends 'set' packets, such as setSwitchVector, setLightVector ..., these contain new values, which update the ipyclient values. They also cause the ipyclient.rxevent(event) method to be called, which you could overwrite to take any actions you prefer.

To transmit a new value you could call the ipyclient.send_newVector coroutine method.

Indipyclient can be installed from Pypi with:

    pip install indipyclient

Further documentation is available at:

https://indipyclient.readthedocs.io

The package can be installed from:

https://pypi.org/project/indipyclient

A terminal client 'indipyterm' is available, which itself calls on indipyclient to do the heavy lifting, and uses the textual package to present terminal characters, this is available at:

https://pypi.org/project/indipyterm

https://github.com/bernie-skipole/indipyterm
cleanprompt 0.1.1
Utility to correctly strip LLM prompts
Requires Python: <3.15,>=3.12.0

[![pytest](https://github.com/salarian/cleanprompt/actions/workflows/pytest.yml/badge.svg)](https://github.com/salarian/cleanprompt/actions/workflows/pytest.yml) [![pre-commit](https://github.com/salarian/cleanprompt/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/salarian/cleanprompt/actions/workflows/pre-commit.yml)

# CleanPrompt
A simple yet frequently used Python utility for safely dedenting and stripping whitespace from LLM prompt strings.

## The problem
When building prompts within Python code, multi-line strings (`"""..."""`) are convenient, but they introduce unwanted leading indentation and newlines that can interfere with model tokenization. A naive `textwrap.dedent(s).strip()` works for most simple prompts. However, typing `textwrap.dedent(s).strip()` gets repetitive quite fast. Many developers wrap it in a single function somewhere in their code. Wouldn't it be nice to have this simple function tucked in a small package and use it everywhere? This is what `CleanPrompt` is trying to achieve.

Once we have the familiar `textwrap.dedent(s).strip()` wrapped in a function, in a package, other concerns start to appear: it fails for more complex cases! For example in few-shot prompts, trailing space (e.g., `A: `) is a critical cue for the model.

`CleanPrompt` solves this by providing a set of simple, safe functions to intelligently dedent and strip whitespace, giving you full control over whether to strip leading, trailing, both, or no whitespace at all.

## Installation
```bash
pip install cleanprompt
```

## Usage and Examples
The package provides one main function, `clean()`, and three convenient aliases for common use cases.

---
### Example 1: Standard Prompt Cleaning (Default)

For most self-contained prompts, you want to remove all code indentation and any surrounding blank lines. The default cleanup_prompt handles this perfectly.

```Python
import cleanprompt as cp

raw_prompt = """

    You are a helpful assistant.
    Please summarize the following text:

    ...text...

"""

clean = cp.clean(raw_prompt)

# Result:
# "You are a helpful assistant.\nPlease summarize the following text:\n\n...text..."
```

---

### Example 2: Preserving Trailing Spaces for Few-Shot Cues
This is the critical use case. For few-shot prompts, you **must** preserve the trailing space after the final "cue" (e.g., `A: `) to guide the model.

Here, we use `clean_leading` to only strip whitespace from the beginning of the string, leaving the important trailing space untouched.

```Python
import cleanprompt as cp

raw_few_shot = """
    Q: What is 2+2?
    A: 4

    Q: What is the capital of France?
    A: Paris

    Q: Who was the first US president?
    A: """

clean = cp.clean_leading(raw_few_shot)

# The clean string correctly ends with "A: "
assert clean.endswith("A: ")

# Result:
# "Q: What is 2+2?\nA: 4\n\nQ: What is the capital of France?\nA: Paris\n\nQ: Who was the first US president?\nA: "
```

# License

Distributed under the terms of the [MIT license](https://opensource.org/license/MIT).
iflow-mcp_bilibili-video-info-mcp 0.2.0
An MCP server to fetch Bilibili video information like subtitles, comments, and danmaku.
Requires Python: >=3.10

# MCP Server for Bilibili Video Info

[![smithery badge](https://smithery.ai/badge/@lesir831/bilibili-video-info-mcp)](https://smithery.ai/server/@lesir831/bilibili-video-info-mcp)
[![English](https://img.shields.io/badge/language-English-blue.svg)](./README.md) [![中文](https://img.shields.io/badge/language-中文-red.svg)](./README.zh.md)

A Bilibili MCP Server that can retrieve subtitles, danmaku (bullet comments), and comments information from videos using the video URL.

## Usage

This MCP server supports three transport methods:
1. **stdio** 
```json
{
    "mcpServers": {
        "bilibili-video-info-mcp": {
            "command": "uvx",
            "args": [
                "bilibili-video-info-mcp"
            ],
            "env": {
                "SESSDATA": "your valid sessdata"
            }
        }
    }
}
```

2. **sse** (Server-Sent Events)
run bilibili-video-info-mcp in sse mode
``` bash
cp .env.example .env
uvx run --env .env bilibili-video-info-mcp sse
```
then config your mcp client
```json
{
    "mcpServers": {
        "bilibili-video-info-mcp": {
            "url": "http://{your.ip.address}:$PORT$/sse"
        }
    }
}
```

3. **streamable-http** (HTTP Streaming)
run bilibili-video-info-mcp in streamable-http mode
``` bash
cp .env.example .env
uvx run --env .env bilibili-video-info-mcp streamable-http
```
then config your mcp client
```json
{
    "mcpServers": {
        "bilibili-video-info-mcp": {
            "url": "http://{your.ip.address}:$PORT$/mcp"
            }
        }
    }
}
```

## MCP Tools List

### 1. Get Video Subtitles

```json
{
  "name": "get_subtitles",
  "arguments": {
    "url": "https://www.bilibili.com/video/BV1x341177NN"
  }
}
```

### 2. Get Video Danmaku (Bullet Comments)

```json
{
  "name": "get_danmaku",
  "arguments": {
    "url": "https://www.bilibili.com/video/BV1x341177NN"
  }
}
```

### 3. Get Video Comments

```json
{
  "name": "get_comments",
  "arguments": {
    "url": "https://www.bilibili.com/video/BV1x341177NN"
  }
}
```

## FAQ

### 1. How to find SESSDATA?

1. Log in to the Bilibili website
2. Open browser developer tools (F12)
3. Go to Application/Storage -> Cookies
4. Find the value corresponding to SESSDATA

### 2. Error "SESSDATA environment variable is required"

Make sure you have set the environment variable:

```bash
export SESSDATA="your SESSDATA value"
```

### 3. What video link formats are supported?

Standard Bilibili video links are supported, such as:
- https://www.bilibili.com/video/BV1x341177NN
- https://b23.tv/xxxxx (short links)
- Any link containing a BV number