semvec/pypi-packages huggingface dataset:
nanonis-tramea 1.0.7
Python package for controlling Nanonis Tramea software through python
Requires Python: >=3.8

# Python Interface Package for Nanonis 

Official python package for the Nanonis TRAMEA Controller software.

## Usage

This package allows users of the Nanonis TRAMEA Controller software to use and control
said software through python commands.

## How to use

### Importing

import nanonis_tramea

### Initializing Connection through the socket module

import socket

connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

connection.connect((IP_ADRESS_HERE, PORT_HERE))

nanonisInstance = nanonis_spm.Nanonis(connection)

NOTE : THE PORT HAS TO BE AN INTEGER AND THE IP ADRESS A STRING

### Enabling Debug Console Output

The function "returnDebugInfo()" takes an integer as an argument. 
This integer should be either 1 = on, or 0 = off. This option is off by default.

Enable by running:
nanonisInstance.returnDebugInfo(1)

### Examples

There is a collection of examples installed with the package.

The description of all the available functions can be found in the TCP Protocol Document, and hovering on the function depending on the used IDE.

IMPORTANT:
The TCP Interface requires every argument to be of certain size (see documentation).
This is why the Numpy dependency is required, since it enables the specification
of variable sizes. 

## Change Log
### 1.0.7
Added missing argument to TCPLog_ChsSet.
### 1.0.6
Fixed the programmatic control of the Oscilloscope High Resolution graph, where some functions now include an input for channel selection to support the 4-channel version of this graph.
### 1.0.5
Fixed some missing variable names in the function declaration of some MCVA functions.
Removed a check in the ParseError function which set a different error string offset for functions returning exactly 8 bytes.
### 1.0.4
Fixed the indentation of two Script functions (Script.Open and Script.LUTOpen) which triggered an error when trying to use the class.
Changed the behavior of the returnDebugInfo function so that nothing is printed out if there is no error.
### 1.0.3
Added the function Util.VersionGet to get the software version, the MCVA5 preamplifier functions, and the V5e Generic PI Controller functions.
pymupdf4llm-enhanced-mcp 0.1.2
基于 PyMuPDF4LLM 和 Tiktoken 的 PDF 解析与分块 MCP 服务器
Requires Python: >=3.13

# PyMuPDF4LLM Enhanced MCP

基于 PyMuPDF4LLM 和 Tiktoken 的 PDF 解析与分块 MCP 服务器。

## 功能特性

- 🔍 PDF 转 Markdown 格式
- 📊 基于 Token 的智能分块（使用 Tiktoken o200k_base）
- 💾 SHA256 哈希缓存机制
- 🔄 可配置的块重叠
- 📡 完整 MCP 协议支持

## Claude Code 配置

```bash
claude mcp add -s local pymupdf4llm-enhanced pymupdf4llm-enhanced-mcp
```

## 使用方法

### parse_pdf - 解析 PDF

将 PDF 转换为 Markdown 并分块。

```python
parse_pdf(
    file_path="/path/to/document.pdf",
    chunk_size_tokens=2000,
    chunk_overlap_tokens=200
)
# 返回: {"chunks_count": 15, "cached": false}
```

### read_chunk - 读取分块

从缓存读取指定分块。

```python
read_chunk(
    file_path="/path/to/document.pdf",
    chunk_index=0
)
# 返回: {"chunk_index": 0, "content": "...", "file_path": "..."}
```

## 工作原理

1. 计算 PDF 文件的 SHA256 哈希值
2. 转换为 Markdown 并按 Token 数分块
3. 缓存到 `.pymupdf4llm-enhanced-mcp/` 目录
4. 文件变更时自动重建缓存

## 使用场景

- **大型文档分析**：处理长篇论文、技术手册
- **RAG 系统**：为检索增强生成准备文档块
- **批量处理**：高效处理多个相同文档的查询

## 最佳实践

- **块大小**：根据 LLM 上下文窗口设置（1000-3000 tokens）
- **重叠率**：建议 10-15% 保持上下文连贯性
- **缓存管理**：定期清理旧缓存释放空间

## 常见问题

**Q: 缓存占用过大**
A: 删除 `.pymupdf4llm-enhanced-mcp/` 目录

**Q: PDF 返回空内容**
A: 检查 PDF 是否损坏或需要 OCR

## 相关链接

- [MCP 协议](https://modelcontextprotocol.io/)
- [PyMuPDF4LLM](https://github.com/pymupdf/PyMuPDF4LLM)
- [Tiktoken](https://github.com/openai/tiktoken)