ppt-common
Shared utilities for slide-deck generation packages — published so
downstream packages (e.g. ppt-quality-review) and external projects can
depend on one copy.
Zero core dependencies; optional extras for the LLM client and agents.
Install
pip install ppt-common # text utilities only
pip install "ppt-common[llm]" # + OpenAI-compatible LLM client
pip install "ppt-common[agents]" # + pydantic-ai agent helpers
Modules
| Module | Contents |
|---|---|
ppt_common.text |
CJK detection (is_cjk, is_cjk_char, ...), sentence splitting, PDF line merging, page cleaning, section-header detection |
ppt_common.text_metrics |
CJK-aware rendered-width estimation, fit_font_size, greedy line wrapping |
ppt_common.pdf_structure / ppt_common.content_splitter |
PDF structure helpers |
ppt_common.llm ([llm] extra) |
LLMClient for any OpenAI-compatible endpoint, parse_llm_json |
ppt_common.agents ([agents] extra) |
pydantic-ai agent utilities |
LLM client configuration
LLMClient works with any OpenAI-compatible endpoint. Configuration falls
back through environment variables:
| Parameter | Explicit arg | Env vars (first match wins) |
|---|---|---|
| API key | api_key= |
DASHSCOPE_API_KEY, LLM_API_KEY |
| Base URL | base_url= |
DASHSCOPE_BASE_URL, LLM_BASE_URL |
| Model | model= |
DASHSCOPE_MODEL, LLM_MODEL |
from ppt_common.llm import LLMClient
client = LLMClient() # reads env vars
reply = client.chat("Summarize: ...") # or pass api_key=/base_url=/model=
Development
Tests live in tests/ — run with pytest tests/. text.py and
text_metrics.py carry a mutmut mutation-audit pilot (100% kill rate).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppt_common-1.0.0.tar.gz.
File metadata
- Download URL: ppt_common-1.0.0.tar.gz
- Upload date:
- Size: 48.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1342bd68b0e37d6555e9eb57896ee31c1ff899ea6311cab6f78da83fa2072f26
|
|
| MD5 |
76ae434c91293abd69a72b100ad04096
|
|
| BLAKE2b-256 |
a0888fc2cb07ccfb3938f04be1b21d167e13413989b7fa0f97473f8bb494a82c
|
File details
Details for the file ppt_common-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ppt_common-1.0.0-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f585f1fe7732326c746768f4c6b771215f24a17905cc7f074a30fefbeaba1526
|
|
| MD5 |
647a35018327f62d9a8261fdaf3debb2
|
|
| BLAKE2b-256 |
f46e24bf8a326afe75d715030d4a086a814c58f38892880953eaa9b950a98dfe
|