semvec/pypi-packages huggingface dataset:
py-jxz 0.1.6
Python library for building, reading, and verifying .jxz signed containers
Requires Python: >=3.11
Keywords: container, junit, jxz, signing, xml, xmldsig, zip

<!-- SPDX-FileCopyrightText: 2026 Georges Martin <jrjsmrtn@gmail.com> -->
<!-- SPDX-License-Identifier: Apache-2.0 -->

# py-jxz

Python library for building, reading, and verifying `.jxz` signed containers.

The `.jxz` format packages signed JUnit XML test reports with attachments for secure transmission, as specified by the [jux-container-format](https://github.com/jux-tools/jux-container-format) specification.

## Features

- **Build** `.jxz` containers from JUnit XML reports and attachments
- **Read** and extract `.jxz` containers with digest validation
- **Sign** containers with detached XMLDSIG signatures
- **Verify** signatures and SHA-256 manifest digests
- **Minimal dependencies**: `signxml` + `cryptography` beyond stdlib

## Installation

```bash
pip install py-jxz
```

## Quick Start

### Build a container

```python
from jxz import ContainerBuilder

builder = ContainerBuilder()
builder.set_report(junit_xml_bytes)
builder.add_attachment("screenshots/login.png", png_bytes)

# Unsigned
jxz_bytes = builder.build()

# Signed
jxz_bytes = builder.build(private_key=key, certificate=cert)
```

### Read and verify a container

```python
from jxz import ContainerReader

reader = ContainerReader(jxz_bytes)
reader.verify()
report = reader.get_report()
attachments = reader.get_attachments()
```

## Documentation

- [Format Specification](https://github.com/jux-tools/jux-container-format)
- [Changelog](CHANGELOG.md)

## Related Projects

| Project | Description |
|---------|-------------|
| [jux-container-format](https://github.com/jux-tools/jux-container-format) | `.jxz` format specification |
| [py-juxlib](https://github.com/jux-tools/py-juxlib) | Jux client library (depends on py-jxz) |
| [jux-openapi](https://github.com/jux-tools/jux-openapi) | Jux REST API specification |

## License

Apache-2.0
dfview 0.1.2
View pandas DataFrames in a browser.
Requires Python: >=3.10
Keywords: browser, dataframe, pandas, viewer

# dfview

View pandas DataFrames in a browser.

## Selection mode

Hold **Alt** for advanced cell selection:

- **Alt+drag** — select a rectangular region of cells
- **Alt+click** — toggle individual cells, entire rows (click index), or entire columns (click header)
- **Ctrl+C** / **Cmd+C** — copy selection as tab-separated text
previewier 0.1.1
Lightweight remote image/video preview server for Python scripts
Requires Python: >=3.10

# previewier

[![CI](https://github.com/JooudDoo/Previewier/actions/workflows/ci.yml/badge.svg)](https://github.com/%3COWNER%3E/%3CREPO%3E/actions/workflows/ci.yml)

Lightweight Python 3.10+ library for remote preview of images/video from scripts running on servers.

## Goals

- Minimal integration into existing scripts.
- Lightweight HTTP preview (MJPEG) without heavy web frameworks.
- Optional RTSP stream for standard players.
- Optional recording to file with PyAV and configurable codec/container.

## Install

Base package:

```bash
pip install previewier
```

With optional features:

```bash
pip install "previewier[opencv,av]"
```

## Quick start (minimal code changes)

```python
from previewier import PreviewServer

server = PreviewServer(
    host="0.0.0.0",
    http_port=8080,
    enable_http=True,
    enable_rtsp=True,
    rtsp_port=8554,
    rtsp_path="/preview",
    rtsp_codec="libx264",
    save_path="recordings/out.mp4",
    save_codec="libx264",
    fps=25,
)
server.start()

# In your frame loop:
# frame: numpy ndarray, BGR, shape [H, W, 3]
server.publish_frame(frame)

# On shutdown:
server.stop()
```

Context manager mode:

```python
from previewier import PreviewServer

with PreviewServer(host="0.0.0.0", http_port=8080) as server:
    # frame loop
    server.publish_frame(frame)
```

HTTP preview URL:

- `http://<server-ip>:8080/` (live MJPEG page)
- `http://<server-ip>:8080/snapshot.jpg` (latest frame)

RTSP URL:

- `rtsp://<server-ip>:8554/preview`

## API

`PreviewServer(...)` key options:

- `enable_http=True`: enable built-in MJPEG HTTP server.
- `enable_rtsp=False`: enable RTSP publish via PyAV.
- `rtsp_codec="libx264"`: RTSP codec, e.g. `libx264`, `libx265`, `mpeg4`.
- `save_path=None`: if set, writes video using PyAV.
- `save_codec="libx264"`: recording codec, e.g. `libx264`, `libx265`, `mpeg4`, `mjpeg`.
- `save_pix_fmt="yuv420p"`: output pixel format for recorder.

Methods:

- `start() / stop()`
- `publish_frame(frame)` for ndarray BGR frame
- `publish_jpeg(jpeg_bytes)` if you already have JPEG bytes

## Notes

- For `publish_frame`, install at least one JPEG backend:
  - OpenCV: `pip install previewier[opencv]`
  - Pillow: `pip install previewier[pillow]`
- RTSP mode requires PyAV: `pip install previewier[av]`.
- RTSP mode publishes to an external RTSP server endpoint (for example MediaMTX).
- If `host="0.0.0.0"`, RTSP publish target is normalized to `127.0.0.1`.
- Recording requires PyAV: `pip install previewier[av]`.

## Example

See `examples/basic_cv2.py`.

## Development

Install dev tools in your `.venv`:

```bash
pip install -e ".[dev]"
```

Enable git hooks:

```bash
pre-commit install --hook-type pre-commit --hook-type pre-push
pre-commit run --all-files
```
tradingdate 0.0.12
Manages trading dates.
Requires Python: >=3.12
Keywords: config

# tradingdate
Manages trade dates.

## Installation
```sh
$ pip install tradingdate
```

## Requirements
```txt
chinesecalendar
```
## Usage
### Get a calendar
```py
>>> import tradingdate as td
>>> cal = td.get_calendar("chinese") # by default "chinese"
>>> cal
TradingCalendar(20040102 ~ 20261231, 'chinese')
>>> list(cal)[:3]
[TradingDate(20040102), TradingDate(20040105), TradingDate(20040106)]
```

### Get a trading date
```py
>>> date = td.date(20250116)
>>> date
TradingDate(20250116)
>>> print(date.year, date.month, date.day)
2025 01 16

>>> date - 20
TradingDate(20241218)
>>> date + 100
TradingDate(20250617)

>>> date.week.start, date.week.end
(TradingDate(20250113), TradingDate(20250117))
>>> date.month.start, date.month.end
(TradingDate(20250102), TradingDate(20250127))
>>> date.year.start, date.year.end
(TradingDate(20250102), TradingDate(20251231))
```

### Get iterator of trading dates
```py
>>> list(td.daterange(20250101, 20250107))
[TradingDate(20250102), TradingDate(20250103), TradingDate(20250106)]
```

### Make a new calendar
```py
>>> td.make_calendar("user-defined", [20250101, 20250115, 20250201])
TradingCalendar(20250101 ~ 20250201, 'user-defined')
>>> list(td.daterange(20250101, 20250131, calendar_id="user-defined"))
[TradingDate(20250101), TradingDate(20250115)]
```

## See Also
### Github repository
* https://github.com/Chitaoji/tradingdate/

### PyPI project
* https://pypi.org/project/tradingdate/

## License
This project falls under the BSD 3-Clause License.

## History
### v0.0.12
* Fixed the returntype of `daterange()`.

### v0.0.11
* New parameters for `daterange()`: `step` and `include_end`. 
* Removed `get_trading_dates()`, use `daterange(include_end=True)` instead.
* Renamed `get_trading_date()` to `date()`.
* `date(missing = 'use_last')` is deprecated, use `date(missing = 'use_before')` now.
* `make_calendar()` can now receive an iterator of int, str or`Tradingtate` objects, and the parameter `date_list` is renamed to `dates`.

### v0.0.10
* New method `DateRange.apply()`.

### v0.0.9
* Updated support for comparison operators and 'in' operators.

### v0.0.8
* Bugfix: no longer raises an OutOfCalendarError when the `end` parameter for `get_trading_dates()` is None. 
* New method `TradingDate.iterate_until()`.
* `daterange()` returns an instance of `DateRange` now.

### v0.0.7
* Updated `make_calendar()`: raises ValueError when `calender_id` already exists.

### v0.0.6
* New function `daterange()`.

### v0.0.5
* New property `TradingDate.week`.

### v0.0.4
* Improved effeciency when making a calendar.
* Updated message of NotImplementedError raised by `CalendarEngine.get_chinese_calendar()`.

### v0.0.3
* Updated `make_calendar()`: now accepts a date-list as the second positional argument instead of a dict.

### v0.0.2
* New function `make_calendar()`.
* Removed the dependency on `numpy`.

### v0.0.1
* New methods `TradingCalendar.get_year()`, `YearCalendar.get_month()`, `MonthCalendar.get_day()`.
* Bugfix: `TradingDate.__sub__()`.

### v0.0.0
* Initial release.
lemonify 1.1.1
Lemon is a free, lightweight text classifier to indentify toxicity, insult, sexuality, threat, neutrality from a sentance
Requires Python: >=3.8

# Lemon 🍋
Lemon is a free, lightweight and fast python library to detect toxicity, insult, sexuality, threat, neutrality from text. It utilizes machine learning to do so.
# Installation
```py
pip install lemonify
```
**NOTE FOR WINDOWS USER:**
This library uses a small compiled extension on Windows (sdist install).
So you must install Microsoft Visual C++ Build Tools first.
1. Download and install:
    https://visualstudio.microsoft.com/visual-cpp-build-tools/
2. During setup, select:
   "Desktop development with C++"
3. Then run:
```py
python -m pip install --upgrade pip setuptools wheel
pip install lemonify
```
# Example usage
```py
from lemonify import lemon
print(lemon("you are stupid"))
```
# Response example
```py
{'toxicity': 1.0, 'insult': 1.0, 'sexuality': 0.0, 'threat': 0.0, 'neutrality': 0.0}
```
**Note that the value of emotions are in floating points between 0 and 1**
# Made with ♥️ by [Blaze](https://discord.com/users/1238444724386533417)
# Feel free to DM me on discord if there's any issues [Blaze](https://discord.com/users/1238444724386533417) :>
isage-agentic-tooluse-benchmark 0.1.1
SAGE Tool Use Benchmark - Tool selection and use evaluation framework
Requires Python: >=3.11
Keywords: sage, benchmark, tool-selection, tool-use, planning, timing-detection, evaluation, intellistream

# SAGE Agentic Tool Use Benchmark

Configuration-driven experiment framework for evaluating tool selection and use capabilities.

## Features

- **Tool Selection Evaluation**: Tool retrieval and ranking benchmarks
- **Planning Evaluation**: Multi-step planning with tool composition
- **Timing Detection**: Timing judgment for tool invocation decisions

## Quick Start

```bash
# Install
pip install isage-agentic-tooluse-benchmark

# Run tool selection experiment
sage-agentic-tooluse-bench tool-selection --config config/tool_selection_exp.yaml

# Run planning experiment
sage-agentic-tooluse-bench planning --config config/planning_exp.yaml
```

## Documentation

See [benchmark_agent/README.md](src/sage/benchmark/benchmark_agent/README.md) for detailed documentation.

## Development

```bash
# Clone
git clone https://github.com/intellistream/sage-agentic-tooluse-benchmark.git
cd sage-agentic-tooluse-benchmark

# Setup virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest
```

## License

MIT License - see [LICENSE](LICENSE) for details.
terrakio-admin-api 0.5.24
Admin version of the terrakio-python-api
Requires Python: >=3.11

# Terrakio Admin API Client

Administrative API client for Terrakio services. This package extends the regular Terrakio API client with additional administrative capabilities.

## Features

- All features from the regular API client
- User management (create, view, edit, delete users)
- Dataset management (create, edit, update, delete datasets)
- Mass stats functionality (create pyramid)

## Installation

```bash
pip install terrakio-admin-api
```

## Usage Example

```python
from terrakio_admin_api import Client

# Initialize the admin client, default url is https://api.terrak.io
admin_client = Client(url = "https://dev-au.terrak.io")

# Login to your admin account
token = admin_client.auth.login(email = "XXX", password = "XXX")
print(f"✓ Login successful, personal token: {token[:10]}...")

# The login account will automatically be used for the requests

# View API key
api_key = admin_client.auth.view_api_key()
print(f"✓ Current API key: {api_key[:10]}...")

# List number of datasets
datasets = admin_client.datasets.list_datasets()
print(f"✓ Listed {len(datasets)} datasets")

# List number of users
users = admin_client.users.list_users()
print(f"✓ Listed {len(users)} users")
```

For more documentation, see the [main repository](https://github.com/HaizeaAnalytics/terrakio-python-api).
terrakio-api 0.5.24
Client version of the terrakio-python-api
Requires Python: >=3.11

# Terrakio API Client

A Python client for Terrakio API. This package provides a user-friendly interface for accessing Terrakio's data services.

## Features

- Authentication
- WCS queries and data retrieval
- Mass stats related functionalities

## Installation

```bash
pip install terrakio-api
```

## Usage Example

```python
from terrakio_api import Client
from shapely.geometry import Point

# Initialize the client
client = Client( url = "https://dev-au.terrak.io")

# Login to your account
token = client.auth.login(email = "XXX", password = "XXX")
print(f"✓ Login successful, personal token: {token[:10]}...")

# The login account will automatically be used for the requests

# View API key
api_key = client.auth.view_api_key()
print(f"✓ Current API key: {api_key[:10]}...")

# Create a geographic feature
point = Point(149.057, -35.1548)

# Make a WCS request
dataset = client.geoquery(
     expr="prec=MSWX.precipitation@(year=2024, month=1)\nprec",
     feature=point,
     output="netcdf"
)
```

For more documentation, see the [main repository](https://github.com/HaizeaAnalytics/terrakio-python-api).
opengeo 0.0.1
A Google Earth Engine-like Python package using Xarray and Dask
Requires Python: >=3.8

# OpenGeo (`og`)

OpenGeo is a Python package designed to provide a Google Earth Engine-like experience using open-source geospatial tools such as Xarray, Dask, STAC, and GeoPandas. The goal is to smooth the transition for GEE users to the open Python ecosystem.

## Features

- **API Familiarity**: Mimics `ee.Image`, `ee.ImageCollection`, `ee.FeatureCollection` and `ee.Geometry` APIs.
- **Lazy Loading**: Uses `stackstac` and `dask` to lazily load and process imagery from STAC catalogs.
- **Local Processing**: Run your analysis locally or on a standard Dask cluster without GEE quotas.
- **Interoperability**: Seamlessly integrate with `xarray`, `geopandas`, and `shapely`.

## Installation

1. Create a virtual environment (recommended):
   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   ```

2. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```

3. Install the package in editable mode:
   ```bash
   pip install -e .
   ```

## Usage

```python
import opengeo as og

# Initialize (optional, sets default STAC API)
og.Initialize()

# Create a region of interest
roi = og.Geometry.Rectangle(77.58, 12.96, 77.60, 12.98)

# Load an ImageCollection from a STAC ID (e.g., Sentinel-2 L2A)
col = og.ImageCollection("sentinel-2-l2a") \
    .filterDate("2023-01-01", "2023-01-31") \
    .filterBounds(roi) \
    .select(["red", "nir"])

# Compute a composite (mean)
image = col.mean()

# Calculate NDVI
ndvi = (image.select("nir") - image.select("red")) / (image.select("nir") + image.select("red"))

# Reduce over the region
stats = ndvi.reduceRegion(reducer="mean", geometry=roi, scale=10)
print(stats)
```

## Comparisons

| GEE | OpenGeo | Underlying Tech |
|---|---|---|
| `ee.ImageCollection` | `og.ImageCollection` | `pystac_client` + `stackstac` |
| `ee.Image` | `og.Image` | `xarray.DataArray` |
| `ee.FeatureCollection` | `og.FeatureCollection` | `geopandas.GeoDataFrame` |
| `ee.Geometry` | `og.Geometry` | `shapely.geometry` |

## Backend

OpenGeo defaults to using the [Earth Search](https://earth-search.aws.element84.com/v1) STAC API. You can change this via `og.Initialize(url="...")`.

## License

MIT
terrakio-core 0.5.24
Core package for the terrakio-python-api
Requires Python: >=3.11

# Terrakio Core

Core components for Terrakio API clients. This package provides the foundational classes and utilities used by both the regular and admin API clients.

This package is typically not used directly but is a dependency for:
- `terrakio-api`: Regular user client
- `terrakio-admin-api`: Administrative client

For documentation and usage examples, see the [main repository](https://github.com/HaizeaAnalytics/terrakio-python-api).
nullabot 1.2.2
24/7 AI agents that think, design, and code - controlled via Telegram
Requires Python: >=3.11
Keywords: agents, ai, automation, bot, claude, coding, telegram

# Nullabot

24/7 AI agents that think, design, and code - controlled via Telegram.

## Requirements

1. **Python 3.11+**
2. **Claude Code CLI** (requires Claude Max subscription ~$100-200/month)
   ```bash
   npm install -g @anthropic-ai/claude-code
   claude login
   ```

## Install

```bash
pip install nullabot
nullabot setup
```

The setup wizard asks for:
- **Bot token** - Create at [@BotFather](https://t.me/BotFather) on Telegram
- **Your user ID** - Get from [@userinfobot](https://t.me/userinfobot) on Telegram
- **Other users** (optional) - Friends who can use your bot

## Start the Bot

```bash
nullabot bot
```

Now open Telegram and message your bot!

## Telegram Commands

| Command | Description |
|---------|-------------|
| `/start` | Show main menu |
| `/usage` | Show project costs |
| `/rules` | View/add global rules |
| `/chat <question>` | Ask anything |
| `/help` | All commands |

**Admin commands:**
| Command | Description |
|---------|-------------|
| `/users` | List all users |
| `/approve <id>` | Approve a user |
| `/revoke <id>` | Remove user |

## CLI Commands

```bash
nullabot new myproject              # Create project
nullabot think myproject "task"     # Research agent
nullabot design myproject "task"    # Design agent
nullabot code myproject "task"      # Coding agent
nullabot projects                   # List projects
nullabot usage                      # Show costs
```

## Three Agents

| Agent | What it does |
|-------|--------------|
| **Thinker** | Research, analyze, brainstorm |
| **Designer** | UI/UX specs, component design |
| **Coder** | Write code, tests, docs |

Agents automatically hand off context to each other.

## Global Rules

Tell agents what to always/never do:

```
/rules add do Always use TypeScript
/rules add dont Never use console.log
```

Or just say it naturally in any message - it auto-saves!

## Run 24/7

```bash
# Manual (stops when terminal closes)
./run_nullabot.sh bot

# Auto-start on Mac login
./setup_autostart.sh
```

## License

MIT
pkgconf 2.5.1.post1
`pkgconf` is a program which helps with discovering library dependencies and configuring compiler and linker flags.
Requires Python: >=3.10

# pkgconf-pypi

[![CI test](https://github.com/pypackaging-native/pkgconf-pypi/actions/workflows/test.yml/badge.svg)](https://github.com/pypackaging-native/pkgconf-pypi/actions/workflows/test.yml)
[![CI build](https://github.com/pypackaging-native/pkgconf-pypi/actions/workflows/build.yml/badge.svg)](https://github.com/pypackaging-native/pkgconf-pypi/actions/workflows/build.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/pypackaging-native/pkgconf-pypi/main.svg)](https://results.pre-commit.ci/latest/github/pypackaging-native/pkgconf-pypi/main)
[![codecov](https://codecov.io/gh/pypackaging-native/pkgconf-pypi/graph/badge.svg)](https://codecov.io/gh/pypackaging-native/pkgconf-pypi)

[![Documentation Status](https://readthedocs.org/projects/pkgconf-pypi/badge/?version=latest)](https://pkgconf-pypi.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/pkgconf.svg)](https://pypi.org/project/pkgconf/)
[![Discord](https://img.shields.io/discord/803025117553754132?label=Discord%20chat%20pkgconf-pypi)](https://discord.gg/pypa)

This goal of this repo is to facilitate building and publishing of
[pkgconf](https://github.com/pkgconf/pkgconf) binaries on PyPI, primarily for
ease of installing in a cross-platform manner. This is useful when `pkgconf` is
for example needed in workflows of other Python packages.

## Choices

The intent is to:

- distribute `pkgconf` without any modifications
- configure the build with no system directory
- install `pkg-config` as an alias in the scripts directory of the Python
  environment

## Links

Documentation: https://pkgconf-pypi.readthedocs.io
pyspecan 0.5.2
A spectrum analyzer library
Requires Python: >=3.8
Keywords: anonoei, sdr, speca, specan

# pyspecan
 A spectrum analyzer library

 - [Documentation](https://anonoei.github.io/pyspecan/)
 - [PyPI](https://pypi.org/project/pyspecan/)


# Examples
tkGUI, SWEPT mode
![tkGUI_Swept](/media/SWEPT_tkGUI.png)
![tkGUI_Swept](/media/SWEPT_tkGUI2.png)

tkGUI, RT mode
![tkGUI_RT](/media/RT_tkGUI.png)
![tkGUI_RT](/media/RT_tkGUI2.png)

# Usage
- View (-v|--view): specifies which frontend to use (tkGUI)
- Mode (-m|--mode): specifies which processing mode to use (swept, rt)
- Sink (-s|--sink): specifies which interface to use (file, live)
  - Live uses [pysdrlib](https://github.com/anonoei/pysdrlib) for hardware SDR abstractions

## Module
- `python3 -m pyspecan --help`
- tkGUI, swept, file: `python3 -m pyspecan`
- tkGUI, RT, file: `python3 -m pyspecan -m RT`
- tkGUI, swept, live (hackrf): `python3 -m pyspecan -s live -d hackrf`

# Install
1. Run `pip install pyspecan`, to install
2. Run `python3 -m pyspecan --help` to view available arguments

# Contributing
1. `git clone https://github.com/Anonoei/pyspecan`
2. `cd pyspecan`
3. `git branch -c feature/<your feature>`
4. `python3 builder.py -b -l` build and install locally

## Build executable
1. `pyinstaller src/pyspecan.spec`
2. `./dist/pyspecan`
py-easy-tjbrhk 1.0.0
一个简化天津天津博瑞皓科API使用的Python工具包，提供智能音箱发送和服务器API调用的便捷封装。
Requires Python: >=3.6

# py-easy-tjbrhk

一个简化天津博瑞皓科API使用的Python工具包，提供智能音箱发送和服务器API调用的便捷封装。

## 功能特性

- **智能音箱通知**：支持天津博瑞皓科智能音箱的消息通知
- **同步与异步**：同时支持同步和异步操作
- **响应处理**：统一的响应处理机制，自动验证响应结果
- **类型提示**：完整的类型注解，提供良好的IDE支持

## 安装

### 使用pip安装

```bash
pip install py-easy-tjbrhk
```

### 从源码安装

```bash
git clone https://gitee.com/guolei19850528/py_easy_tjbrhk.git
cd py_easy_tjbrhk
pip install -e .
```

## 依赖

- httpx
- jsonschema
- jsonpath-ng

## 快速开始

### 智能音箱通知

```python
from py_easy_tjbrhk.speaker import Speaker

# 初始化Speaker实例
speaker = Speaker(
    base_url="https://speaker.17laimai.cn/",  # API基础URL
    token="YOUR_TOKEN",                       # 认证令牌
    id="YOUR_DEVICE_ID"                      # 设备ID
)

# 发送通知
response = speaker.notify(
    message="测试通知"  # 通知内容
)

print(f"发送结果: {response.validated}")
if response.validated:
    print("通知发送成功！")
else:
    print("通知发送失败！")
```

### 异步智能音箱通知

```python
import asyncio
from py_easy_tjbrhk.speaker import Speaker

async def main():
    speaker = Speaker(
        base_url="https://speaker.17laimai.cn/",
        token="YOUR_TOKEN",
        id="YOUR_DEVICE_ID"
    )
    
    # 异步发送通知
    response = await speaker.async_notify(
        message="测试通知异步"  # 通知内容
    )
    
    print(f"发送结果: {response.validated}")
    if response.validated:
        print("通知发送成功！")
    else:
        print("通知发送失败！")

asyncio.run(main())
```

## API文档

### Speaker类

#### 初始化参数
- `base_url`：API基础URL，默认为"https://speaker.17laimai.cn/"
- `token`：认证令牌
- `id`：设备ID
- `client_kwargs`：传递给httpx.Client的额外参数

#### 方法
- `client(**kwargs)`：创建同步客户端实例
- `async_client(**kwargs)`：创建异步客户端实例
- `request(client=None, **kwargs)`：同步请求方法
- `async_request(client=None, **kwargs)`：异步请求方法
- `notify(client=None, message="", **kwargs)`：同步发送通知
- `async_notify(client=None, message="", **kwargs)`：异步发送通知

### 响应处理

所有API调用都会返回`RequestResponse`对象，包含以下属性：
- `validated`：响应是否有效
- `value`：从响应中提取的值
- `json`：响应的JSON数据
- `response`：原始的httpx.Response对象

## 测试

运行测试用例：

```bash
python -m unittest test_speaker.py
```

## 项目结构

```
py-easy-tjbrhk/
├── py_easy_tjbrhk/
│   ├── __init__.py        # 模块初始化和响应处理
│   └── speaker.py          # 智能音箱操作类
├── test_speaker.py         # 智能音箱测试
├── setup.py               # 安装配置
├── requirements.txt       # 依赖声明
├── LICENSE                # 许可证
└── README.md              # 项目文档
```

## 许可证

MIT License

## 贡献

欢迎提交Issue和Pull Request！

## 联系方式

- 作者：guolei
- 邮箱：174000902@qq.com
- 项目地址：https://gitee.com/guolei19850528/py_easy_tjbrhk