semvec/pypi-packages huggingface dataset:
enhanced-downloader 0.2.3
一个功能强大的增强型下载模块，支持多线程下载、断点续传和进度显示
License: MIT
Requires Python: >=3.7
Keywords: download multi-threading resume progress

# Enhanced Downloader

一个功能强大的Python下载模块，支持：

- 单线程和多线程下载
- 自动检测服务器是否支持分片
- 断点续传
- 进度显示
- 返回内容或保存到文件
- 智能下载策略

## 安装

```bash
pip install enhanced_downloader
```

## 使用示例

```python
from enhanced_downloader import download_file

# 下载并保存到指定路径
download_path = download_file("https://example.com/large_file.zip", save_path="/path/to/save")
print(f"文件保存路径: {download_path}")

# 下载并返回内容
file_content = download_file("https://example.com/file.txt", return_content=True)
print(f"获取到文件内容，大小: {len(file_content)} 字节")

# 使用更多参数
download_path = download_file(
    url="https://example.com/large_file.zip",
    save_path="output.zip",
    num_threads=20,
    timeout=60,
    temp_dir="/tmp/downloads",
    min_size_for_multithread=5*1024*1024  # 5MB以上使用多线程
)
```

## 高级用法

```python
from enhanced_downloader import EnhancedDownloader

# 创建下载器实例
downloader = EnhancedDownloader()

# 使用实例方法
downloader.download(
    url="https://example.com/file.zip",
    save_path="downloads/file.zip",
    num_threads=30,
    force_single_thread=False
)
```

## 参数说明

- `url`: 下载链接
- `save_path`: 保存文件的路径，支持目录或完整文件路径
- `return_content`: 是否返回文件内容而不是保存到本地
- `chunk_size`: 下载块大小
- `timeout`: 请求超时时间（秒）
- `num_threads`: 多线程下载时的线程数
- `temp_dir`: 临时文件目录
- `force_single_thread`: 是否强制使用单线程下载
- `min_size_for_multithread`: 启用多线程下载的最小文件大小

## 版本更新
- 0.1.0: 初始版本
- 0.1.1: 优化多线程下载性能
- 0.1.2: 添加速度限制功能
- 0.1.3: 未指定目录时自动保存到最大可用磁盘，修复路径判断逻辑
- 0.2.0: 添加允许指定代理功能，优化下载速度
- 0.2.1：优化分片时记录的僵尸键清理
- 0.2.2：新增功能，运行断电续传，支持程序重复运行下载同一个文件

## 许可证

MIT License - 详见 LICENSE 文件
altqq 0.0.9
Alternative Queries: Typed and Reusable Handcrafted SQL
License: MIT
Requires Python: <4.0,>=3.9
Keywords: database, SQL

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
[![qa](https://github.com/baluyotraf/altqq/actions/workflows/qa.yml/badge.svg)](https://github.com/baluyotraf/altqq/actions/workflows/qa.yml)
[![release](https://github.com/baluyotraf/altqq/actions/workflows/release.yml/badge.svg)](https://github.com/baluyotraf/altqq/actions/workflows/release.yml)

# Alternative Queries

Alternative queries is a library created to help with handcrafted SQL queries.
It works by providing a class that represent the queries where its parameter
types are checked by `Pydantic`.

If you want to write reusable and nested handcrafted SQL queries, you can check
more information on the [Alternative Queries Documentation]. If you want to know
how Alternative Queries can help you, check the [Why use Alternative Queries?]
section of the documentation.

[Alternative Queries Documentation]: https://altqq.baluyotraf.com/stable/
[Why use Alternative Queries?]: https://altqq.baluyotraf.com/stable/rationale/

## Installation

The library is available in the Python Package Index.

```bash
pip install altqq
```

## Quick Start

To start, define a class by inheriting the `altqq.Query` class. The class should
have a query following the python formatting standards. The variable names
inside the `__query__` must match the other attributes defined on the class.

```python
import altqq

class SelectUserByFirstName(altqq.Query):
    __query__ = """
        SELECT * FROM "Users"
        WHERE first_name = {first_name}
    """
    first_name: str
```

The class can be used like a `dataclass`. In fact, classes inheriting the
`altqq.Query` class are turned into a `Pydantic` `dataclass`.

```python
query = SelectUserByFirstName(first_name="arietta")
```

The object can be converted into a query suitable for a DBMS library of your
choice. For example, calling the `altqq.to_pyodbc` function will convert the
object to `PyODBCQuery` which provides the query string and the parameters.

```python
pyodbc_query = altqq.to_pyodbc(query)
print(pyodbc_query.query)
#
#        SELECT * FROM "Users"
#        WHERE first_name = ?
#
print(pyodbc_query.parameters)
# ['arietta']
```
cpms-client 0.1.2
Python wrapper for the CPMS HTTP API
License: MIT
Requires Python: >=3.9
Keywords: cpms, api, client, automation

# cpms-client (Python)

Lightweight Python wrapper around the CPMS HTTP API exposed by `@lehelkovach/cpms-server-node`.

## Install from PyPI
```bash
pip install cpms-client
```

## Install
This package uses `setuptools` (install `python -m pip install build` if you don't have `build` yet). Build/install locally from the repo root:
```bash
cd python/cpms_client
python -m build
pip install dist/cpms_client-0.1.1-py3-none-any.whl
```

## Usage
```python
from cpms_client import CpmsClient

client = CpmsClient(base_url="http://localhost:8787")

concept = {
    "concept_id": "concept:email@1.0.0",
    "signals": [
        {"signal_id": "terms", "evaluator": "dom.text_contains_any", "params": {"terms": ["email"]}, "mode": "fuzzy", "weight": 1.0}
    ],
    "resolution": {"score_model": {"type": "hybrid_logit", "prior_logit": -1.0, "calibration": "sigmoid"}}
}

observation = {"page_id": "fixture:login", "candidates": [{"candidate_id": "cand_email", "dom": {"label_text": "Email"}}]}

result = client.match(concept, observation)
print(result["result"]["best"])
```

## API helpers
- `match(concept, observation)`
- `match_explain(concept, observation)`
- `match_pattern(pattern, concepts, observation)`
- `detect_form(html, screenshot_path=None, screenshot=None, url=None, dom_snapshot=None, observation=None)` - High-level form detection endpoint
- `schema_language()`
- `concept_template(intent=None)`
- `persist_concept(concept)`
- `draft_concept(intent=None)`
- `draft_pattern(intent=None)`
- `activate(kind, uuid)`

All methods raise `RuntimeError` when the HTTP call fails (non-2xx or network issues).