semvec/pypi-packages huggingface dataset:
xfapi 0.1.9
Apis tool base fastapi
Requires Python: >=3.9

# xfapi 第三方库使用说明

## 一、概述

xfapi 是一个基于 FastAPI 框架开发的轻量级 RESTful API 框架。它允许通过 YAML 文件来配置 API 接口以及业务逻辑关联，并支持基础的 token 验证。xfapi 旨在提供高效、易用和可扩展的 API 开发体验。

## 二、安装

可以通过 pip 安装 xfapi：

```bash
pip install xfapi
```

## 三、配置文件示例

xfapi 使用 YAML 文件来配置 API 接口。以下是一个示例配置文件：

```yaml
apis:
- name: "token"
  path: "/token"
  method: "POST"
  handler: "apis.handler_token"

- name: "index"
  path: "/"
  method: "GET"
  handler: "apis.index"
```

- `name`: 接口的名称（可选）。
- `path`: 接口的路径。
- `method`: 请求方法（GET, POST, PUT, DELETE 等）。
- `handler`: 处理该接口的回调函数所在的模块和函数名（使用点号 `.` 分隔）。

## 四、回调函数示例

回调函数是处理 API 请求的逻辑函数。以下是一个简单的示例：

```python
from fastapi import Request
from xfapi.utils.auth import JWTUtils

def handler_token(data: dict):
    # token 方法示例(post)
    jwt = JWTUtils()
    token = jwt.encode_token({
        "data": data,
    })
    return {"token": token}

def index(request: Request):
    # get方法示例
    print(request.query_params)
    return {"data": "data"}

# ... 其他方法同理，支持 get, post, put, delete 等方法
```

- `data`: 在 POST 请求中，可以通过参数直接获取请求体数据。
- `request`: 在 GET 或其他请求中，可以通过 `Request` 对象获取请求信息。

## 五、调用示例

以下是如何使用 xfapi 启动服务器的示例：

```python
from xfapi.server import HTTPServer
from xfapi.utils.auth import TokenMiddleware

# 假设你已经有了 TokenMiddleware 的实现
token_middleware = TokenMiddleware()

# 创建一个 HTTPServer 实例，并传入 token 验证中间件
server = HTTPServer(auth_middleware=token_middleware.token_validation_middleware)

# 启动服务器
server.start()
```

在启动服务器后，xfapi 会根据 YAML 配置文件自动注册路由，并打印相关信息到控制台。

## 六、日志示例

服务器启动成功后，你可能会在控制台看到以下日志：

```log
INFO:xfapi.server:注册路由: /token POST -> apis.handler_token
INFO:xfapi.server:注册路由: / GET -> apis.index
INFO:     Started server process [43522]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
```

## 七、总结

xfapi 是一个基于 FastAPI 的轻量级 RESTful API 框架，它允许你通过 YAML 文件配置 API 接口和业务逻辑关联，并支持基础的 token 验证。使用 xfapi 可以帮助你更高效地构建、部署和维护 API 服务。希望这个使用说明能够帮助你快速上手 xfapi！
cprintf 0.0.11
Printing and debugging with color
Requires Python: >=3.6


## cprintf

## 安装

`pip install cprintf`

## 使用方法

```python
import cprintf
from time import sleep

# 设置日志级别
cprintf.set_log_level('DEBUG')  # 可选: DEBUG, INFO, WARNING, ERROR, FATAL

# 基本打印功能
cprintf.info("普通字符串")
cprintf.info('{"hello": "world", "list": [1, 2, 3]}')
cprintf.info({"hello": "world", "list": [1, 2, 3]})
cprintf.warn({"warn_key": True})
cprintf.err("这是一条错误信息", format_mode='pprint')
cprintf.fatal("This is a fatal error.")
cprintf.ok('强制使用 pprint 模式', format_mode='pprint')
cprintf.debug('强制使用 raw 模式', format_mode='raw')

# 带时间戳的日志
cprintf.info("这是一条带时间戳的信息", timestamp=True)

# 分割线
cprintf.line()
cprintf.line(char='=', length=60, color='OK')

# 自定义颜色
cprintf.custom("This is a custom color message in cyan!", "\033[96m")

# 进度条
for i in range(100):
    sleep(0.1)
    cprintf.progress_bar(i + 1, 100, prefix='进度:', suffix='完成', length=50)

# 打印表格
data = [
    [1, "Alice", 25],
    [2, "Bob", 30],
    [3, "Charlie", 35]
]
cprintf.print_table(data, headers=["ID", "Name", "Age"], color='INFO')

# 获取带颜色的字符串（不打印）
colored_str = cprintf.get_colored_string("这是一个带颜色的字符串", color='WARNING')
print(colored_str)
```

## 功能说明

- **日志级别控制**：通过 `set_log_level()` 设置日志级别，低于该级别的日志将不会显示
- **时间戳**：在日志信息前添加时间戳，使用 `timestamp=True` 参数
- **进度条**：使用 `progress_bar()` 方法显示进度条
- **表格打印**：使用 `print_table()` 方法打印整齐的表格
- **自定义颜色**：使用 `custom()` 方法自定义颜色，或使用 `get_colored_string()` 获取带颜色的字符串
- **格式化模式**：支持 `raw`、`json`、`pprint` 和 `auto` 四种格式化模式
```
hdfs-docling-analyze 0.4.0
A library for analyzing files from HDFS and saving results to MongoDB
Requires Python: >=3.8

# HDFS Analyze Library

A Python library to process files from HDFS, analyze them, and store results in MongoDB.

## Steps to Set Up and Use

### 1. Create a Virtual Environment
Run the following command to create a virtual environment:
```bash
python -m venv venv

pip install -r requirements.txt
pip install tesserocr-2.7.1-cp311-cp311-win_amd64.whl
szyfrowanie-json 0.1.0
Biblioteka do szyfrowania i odszyfrowywania plików JSON.
Requires Python: >=3.6

# szyfrowanie

Biblioteka `szyfrowanie` pozwala na Ĺ‚atwe szyfrowanie i odszyfrowywanie plikĂłw JSON z uĹĽyciem algorytmu AES.

## Instalacja

1. Zainstaluj za pomocÄ… pip:
   ```bash
   pip install szyfrowanie_json
solvis-evaluations-api 0.1.7b0
This is a package for requesting and processing data from Solvis's evaluations API.
Requires Python: >=3.11

# Solvis Evaluations API

This is a package for requesting and processing data from Solvis's evaluations API.
The package is designed to handle request evaluations and efficiently transforming them into a tabular format (pandas dataframe) suitable for analysis.


## Features

- Request data from the following endpoints:
  - Evaluations
- Converts csv data into a flat pandas dataframe.
- Robust handling of unexpected or malformed data.
- Logging for process tracking and debugging.


## Installation

Install the package via pip (or your favorite package manager):

```bash
pip install solvis-evaluations-api
```


## Usage

### Importing the Module

```python
from solvis_evaluations_api import GetEvaluations
```

### Example

```python
# Initialize modules
api = GetEvaluations()

# Request API
evaluations = api.get_evaluations(
    user='',
    password='',
    survey_id='',
    start_datetime='01/01/2024',
    end_datetime='01/01/2024',
)

# Print output
print(df)
```


## Dependencies

- Python 3.12+
- Pandas
- Requests


## Contact

For questions or feedback, feel free to reach out:

- Author: Paulo Victor
- Email: paulo.barbosa@solvis.com.br
solvis-results-api 0.1.6b0
This is a package for requesting and processing data from Solvis's results API.
Requires Python: >=3.11

# Solvis Results API

This is a package for requesting and processing data from Solvis's results API.
The package is designed to handle complex nested data structures, efficiently transforming them into a tabular format (pandas dataframe) suitable for analysis.


## Features

- Request data from the following endpoints:
  - Devices
  - Evaluations
  - Questionnaire
  - Surveyed Units
  - Suspicious Occurrences
- Converts nested data into a flat pandas dataframe.
- Handles various evaluations question types, including:
  - **NPS (Net Promoter Score)**
  - **Scale**
  - **Multiple Choice**
  - **Text and Short Text**
  - **Multiple Response**
  - **Special Types** (Phone, CPF, CNPJ, Email)
- Robust handling of unexpected or malformed data.
- Logging for process tracking and debugging.


## Installation

Install the package via pip (or your favorite package manager):

```bash
pip install solvis-results-api
```


## Usage

### Importing the Module

```python
from solvis_results_api import GetEvaluations, ProcessEvaluations
```

### Example

```python
# Initialize modules
api = GetEvaluations()
processor = ProcessEvaluations()

# Request API
evaluations = api.get_evaluations(
    user='',
    password='',
    survey_id='',
    start_datetime='2025-01-01T00:00:00',
    end_datetime='2025-01-31T23:59:59',
)

# Process the data
df = processor.process_evaluations(evaluations)

# Print output
print(df)
```


## Dependencies

- Python 3.12+
- Pandas
- Requests


## Contact

For questions or feedback, feel free to reach out:

- Author: Paulo Victor
- Email: paulo.barbosa@solvis.com.br
verysteno 1.0.0
A library for encoding and decoding messages in sound and images using steganography.
Requires Python: >=3.7

# VerySteno
VerySteno lets you encode hidden text in sound and images.
## Usage
VerySteno is simple to use. To encode in an image:
```python
from verysteno import EncodeInImage, DecodeFromImage

EncodeInImage("input.png", "This message is secret.")
decoded_message = DecodeFromImage("input_encoded.png")
print(decoded_message)
```
To encode in an sound:
```python
from verysteno import EncodeInSound, DecodeFromSound

EncodeInSound("input.wav", "This is a secret message.")
decoded_message = DecodeFromSound("input_encoded.wav")
print(decoded_message)
```
And to use passwords:
```python
from verysteno import EncodeInSound, DecodeFromSound

EncodeInSound("input.wav", "This secret message has a password!", "verypassword")
decoded_message = DecodeFromSound("input_encoded.wav", "verypassword")
print(decoded_message)
```