Skip to main content

pplyz

PyPI Downloads

python + prompt + analyze

Add LLM-generated columns to a CSV with one command.

Requirements

  • uv (Recommended)
  • At least one LiteLLM-compatible API key (OpenAI, Gemini, Anthropic, etc.), or a local Ollama server (no API key needed)

uv is the easiest way to run the CLI.

Usage

Install

uv tool install pplyz

Example

pplyz test.csv \
  --input title,abstract \
  --output "relevant:bool,summary:str" \
  --model openai/gpt-4o-mini

This command sends the title and abstract columns to the LLM, adds relevant and summary columns to test.csv, and uses the openai/gpt-4o-mini model.

[!note] The CLI prompts you for a task description before processing unless --prompt or --prompt-file is provided. Output is written back to the input CSV file (overwrite).

Command arguments

Use -h or --help to list arguments.

pplyz -h
Flag Description Required
INPUT (positional) Input CSV path. Yes
-i, --input Comma-separated input column names (e.g., title,abstract). Yes (unless default is set)
-o, --output Output schema (e.g., score:int,notes:str). Types: bool, int, float, str. Yes (unless default is set)
-p, --preview Process a few rows and show would-be output without writing. No
-m, --model LiteLLM model name. No
--api-base Base URL for the LLM API (for Ollama or other OpenAI-compatible local servers). No
-f, --force Reprocess all rows (resume is default). No
--prompt Inline prompt text (skips interactive prompt entry). No
--prompt-file Path to a prompt text file (skips interactive prompt entry). No

Configuration

  1. Create the user config once:
mkdir -p ~/.config/pplyz
$EDITOR ~/.config/pplyz/config.toml

On Windows, use %APPDATA%\\pplyz\\config.toml.

  1. Add only the providers you actually use:
[env]
OPENAI_API_KEY = "sk-..."
GROQ_API_KEY = "gsk-..."

[pplyz]
default_model = "openai/gpt-4o-mini"
default_input = "title,abstract"
default_output = "relevant:bool,summary:str"

Settings priority

pplyz loads settings in this order (earlier wins):

  1. Existing environment variables
  2. pplyz.local.toml in the project root (optional)
  3. User config: ~/.config/pplyz/config.toml (or %APPDATA%\\pplyz\\config.toml on Windows; if XDG_CONFIG_HOME is set, it uses that)

To keep configs elsewhere, set PPLYZ_CONFIG_DIR=/path/to/dir and place config.toml there.

[env] table (API keys)

Set these inside the [env] table of your config.toml (or export them as environment variables):

Provider Keys (checked in order)
Gemini GEMINI_API_KEY
OpenAI OPENAI_API_KEY
Anthropic / Claude ANTHROPIC_API_KEY
Groq GROQ_API_KEY
Mistral MISTRAL_API_KEY
Cohere COHERE_API_KEY
Replicate REPLICATE_API_KEY
Hugging Face HUGGINGFACE_API_KEY
Together AI TOGETHERAI_API_KEY, TOGETHER_AI_TOKEN
Perplexity PERPLEXITY_API_KEY
DeepSeek DEEPSEEK_API_KEY
xAI XAI_API_KEY
Azure OpenAI AZURE_OPENAI_API_KEY, AZURE_API_KEY
AWS (Bedrock/SageMaker) AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
Vertex AI GOOGLE_APPLICATION_CREDENTIALS
Ollama (local) none — set OLLAMA_API_BASE if not http://localhost:11434

[pplyz] table (Default settings)

key description default
default_model Sets the fallback LiteLLM model when --model is omitted. gemini/gemini-2.5-flash-lite
default_input Comma-separated columns used when -i/--input is omitted. unset
default_output Output schema used when -o/--output is omitted. unset
default_api_base Base URL passed to the provider (same as --api-base / PPLYZ_API_BASE). unset
preview_rows Number of rows used when --preview is set (can also be overridden via PPLYZ_PREVIEW_ROWS). 3

Local models with Ollama

pplyz can run entirely offline against a local Ollama server — no API key required.

# 1. Start Ollama and pull a model
ollama serve            # usually already running
ollama pull llama3.1

# 2. Run pplyz against it (use the ollama_chat/ prefix)
pplyz test.csv \
  --input title,abstract \
  --output "relevant:bool,summary:str" \
  --model ollama_chat/llama3.1

Notes:

  • Use the ollama_chat/ prefix (chat API); it handles system prompts better than ollama/.
  • The default endpoint is http://localhost:11434. Override it with --api-base, the OLLAMA_API_BASE / PPLYZ_API_BASE env var, or default_api_base in config.toml.
  • JSON output is enforced via Ollama's JSON mode. Local models follow schemas less reliably than hosted ones — prefer bool fields for decisions and test with --preview.
  • --api-base also works for other OpenAI-compatible local servers (LM Studio, vLLM, …).

Supported models

For the latest list of supported models, see the LiteLLM provider docs: https://docs.litellm.ai/docs/providers

Metadata

Release files for pplyz 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pplyz 0.1.6
File Size Uploaded
pplyz-0.1.6.tar.gz 29.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pplyz 0.1.6
File Interpreter ABI Platform
pplyz-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 52.6 kB

Release files / pplyz-0.1.6.tar.gz

Download URL pplyz-0.1.6.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
68738b6485debc00ded92f5da1e060e56fab420ff04f99804c113bfd610a1e51
BLAKE2b-256 checksum
How to use checksums
2dd39c2b1aa958d6be9ed033b4f4ca3c6fc56f54efb7dab9fd035ef16715a35b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / pplyz-0.1.6-py3-none-any.whl

Download URL pplyz-0.1.6-py3-none-any.whl
Size 22.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c82c41fe401415f887f6d2df29a3207109edebe32970a112bc74711da100ebee
BLAKE2b-256 checksum
How to use checksums
c40cd47de55568c2c7131c354563ef9901e43dc14b3111cea20c86a7eabb0539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page