semvec/pypi-packages huggingface dataset:
mp-explore-source-bundestag 0.1.1
Obtain data of Bundestag MPs
Requires Python: >=3.11

<!--
SPDX-FileCopyrightText: 2025 Free Software Foundation Europe e.V. <mp-explore@fsfe.org>

SPDX-License-Identifier: AGPL-3.0-or-later
-->

# MP Explore Bundestag

Part of the [MP Explore](https://git.fsfe.org/mp-explore/mp-explore) project.

Data Source for the Bundestag.

## Where to get it

You can get it through the [Python Package Index (PyPI)](https://pypi.org/project/mp_explore_core/):

```sh
$ pip3 install mp_explore_source_bundestag
```

## Arguments

- (Optional) `display_browser` When enabled, a browser window is opened displaying the actions being performed.
- (Optional) `skip_retired` Skip members who are retired, deceased, or refused mandate.
- (Optional) `url` URL from where the data is extracted.
- (Optional) `infer_email` When enabled, e-mails are inferred based on the pattern they typically follow.
- (Optional) `check_cdu_csu` Obtain e-mails and check information with CDU/CSU sources.
- (Optional) `cdu_csu_url` The URL where the data will be extracted from.
- (Optional) `check_grune` Obtain e-mails and check information with  Bündnis 90/Die Grünen sources.
- (Optional) `grune_url` The URL where the data will be extracted from.
- (Optional) `check_spd` Obtain e-mails and check information with SPD sources.
- (Optional) `spd_url` The URL where the data will be extracted from.
pymupdf4llm-enchanced-mcp 0.1.0
基于 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-enchanced-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-enchanced-mcp/` 目录
4. 文件变更时自动重建缓存

## 使用场景

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

## 最佳实践

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

## 常见问题

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

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

## 相关链接

- [MCP 协议](https://modelcontextprotocol.io/)
- [PyMuPDF4LLM](https://github.com/pymupdf/PyMuPDF4LLM)
- [Tiktoken](https://github.com/openai/tiktoken)
airflow-exporter 1.7.0.dev1
Airflow plugin to export dag and task based metrics to Prometheus.
Keywords: airflow plugin prometheus exporter metrics

# Airflow prometheus exporter

Exposes dag and task based metrics from Airflow to a Prometheus compatible endpoint.

## Compatibility with Airflow versions

### >=3

Versions 1.6.0+ are compatible with Airflow 3.0+

### >=2.0, <3

Versions 1.5.* are compatible with Airflow 2.0+, but does not work with 3+

### <=1.10.14, >=1.10.3

Version v1.3.2 is compatible

**Note: Airflow 1.10.14 with Python 3.8 users**

You should install `importlib-metadata` package in order for plugin to be
loaded. See [#85](https://github.com/epoch8/airflow-exporter/issues/85) for
details.

### <1.10.3

Version [v0.5.4](https://github.com/epoch8/airflow-exporter/releases/tag/v0.5.4)
is compatible

## Install

```sh
pip install airflow-exporter
```

That's it. You're done.

## Exporting extra labels to Prometheus

It is possible to add extra labels to DAG-related metrics by providing `labels`
dict to DAG `params`.

### Example

```python
dag = DAG(
    'dummy_dag',
    schedule_interval=timedelta(hours=5),
    default_args=default_args,
    catchup=False,
    params={
        'labels': {
            'env': 'test'
        }
    }
)
```

Label `env` with value `test` will be added to all metrics related to
`dummy_dag`:

```
airflow_dag_status{dag_id="dummy_dag",env="test",owner="owner",status="running"} 12.0
```

## Metrics

Metrics will be available at 

```
http://<your_airflow_host_and_port>/admin/metrics/
```

### `airflow_task_status`

Labels:

* `dag_id`
* `task_id`
* `owner`
* `status`

Value: number of tasks in a specific status.

### `airflow_dag_status`

Labels:

* `dag_id`
* `owner`
* `status`
* `paused`

Value: number of dags in a specific status.

### `airflow_dag_run_duration`

Labels:

* `dag_id`: unique identifier for a given DAG

Value: duration in seconds of the longest DAG Run for given DAG. This metric 
is not available for DAGs that have already finished.

### `airflow_dag_last_status`

Labels:

* `dag_id`
* `owner`
* `status`
* `paused`

Value: 0 or 1 depending on wherever the current state of each `dag_id` is `status`.

## License

Distributed under the MIT license. See [LICENSE](LICENSE) for more
information.