semvec/pypi-packages huggingface dataset:
preduce 0.3.0
Compress LLM prompts 50%+ while preserving meaning. Lightweight API client.
License: MIT
Requires Python: >=3.8
Keywords: prompt, compression, llm, tokens, openai, gpt, claude, cost-reduction

# preduce

Compress LLM prompts 50%+ while preserving meaning. Cut your API costs in half with one line of code.

## Install

```bash
pip install preduce
```

## Quick Start

```python
from preduce import compress

result = compress("Your verbose text here...", api_key="your-key")

print(result.compressed_text)      # compressed output
print(result.category)             # GENERAL, FINANCIAL, MEDICAL, CODE, ACADEMIC, SUPPORT, or MARKETING
print(result.token_reduction_pct)  # e.g. 52.3
print(result.stats)                # full reduction metrics
```

## Category Override

```python
result = compress(
    "Total revenue for fiscal year 2025 was $847,300,000, "
    "representing an increase of 22.4% year-over-year.",
    api_key="your-key",
    category="FINANCIAL",
)
# → "Total rev FY2025 $847.3M, +22.4% YoY."
```

## Categories

| Category | What it compresses | Example |
|---|---|---|
| **GENERAL** | Business docs, emails, reports | "we are pleased to announce" → removed |
| **FINANCIAL** | Earnings, metrics, filings | "$847,300,000" → "$847.3M" |
| **MEDICAL** | Clinical notes, discharge summaries | "type 2 diabetes mellitus" → "T2DM" |
| **CODE** | Preserves code, compresses prose | Code untouched, comments compressed |
| **ACADEMIC** | Research papers, dissertations | "statistically significant" → "sig." |
| **SUPPORT** | Support tickets, help desk | "thank you for contacting" → "thanks for contacting" |
| **MARKETING** | Marketing copy, promotions | "limited time offer" → "limited time" |

## Response

```python
result.compressed_text   # str — the compressed text
result.category          # str — detected or overridden category
result.original_tokens   # int — estimated original token count
result.compressed_tokens # int — estimated compressed token count
result.confidence_pct    # dict — confidence % per category (e.g. {"FINANCIAL": 85.2, "GENERAL": 14.8, ...})
result.token_reduction_pct  # float — percentage reduction
result.char_reduction_pct   # float — percentage reduction
result.stats             # dict — full metrics
result.to_dict()         # dict — serialize everything
```

## Confidence Scores

The API returns confidence percentages for each category, useful for debugging classification:

```python
result = compress("Revenue increased 15% this quarter.", api_key="your-key")
print(result.confidence_pct)
# {"FINANCIAL": 78.5, "GENERAL": 12.3, "MARKETING": 9.2, ...}
print(result.category)  # "FINANCIAL"
```

## Error Handling

```python
from preduce import compress

try:
    result = compress("text", api_key="invalid-key")
except PermissionError:
    print("Bad API key or quota exceeded")
except ValueError:
    print("Invalid input (empty text or bad category)")
except RuntimeError:
    print("API error")
```

## Get an API Key

Visit [preduce.dev](https://preduce.dev) to get your API key.

## License

MIT
standup-cli-tool 0.1.0
⚡ Generate your daily standup from git commits — right in your terminal
License: MIT
Requires Python: >=3.8
Keywords: standup, cli, git, developer, productivity, scrum

# ⚡ standup-cli

> Generate your daily standup from git commits — right in your terminal.

Never manually write a standup again. `standup-cli` scans your git commits from the last 24 hours, asks what you're working on today and if you have blockers, then formats a clean standup message ready to paste anywhere.

```
$ standup

  ⚡ standup-cli
  Generate your daily standup in seconds

  🔍 Scanning git commits from last 24hrs...
  ✅ Found 3 commit(s):

     • Fixed auth bug in login flow
     • Updated API documentation
     • Refactor user model

  🚀 What are you working on today?
  > Integrating Stripe payment API

  🚧 Any blockers? (press Enter for "None")
  > None

  ──────────────────────────────────────────────────
  ✅ Your Standup [plain]

  Yesterday: Fixed auth bug in login flow, Updated API documentation, Refactor user model
  Today: Integrating Stripe payment API
  Blockers: None
  ──────────────────────────────────────────────────

  💡 Tip: use --format slack | markdown | plain
```

## Install

**via npm:**
```bash
npm install -g standup-cli
```

**via pip:**
```bash
pip install standup-cli
```

## Usage

```bash
# Default (plain text output)
standup

# Slack-ready output
standup --format slack

# Markdown output
standup --format markdown
```

## Output Formats

**Plain** (default) — paste anywhere:
```
Yesterday: Fixed auth bug, updated docs
Today: Stripe integration
Blockers: None
```

**Slack** — with bold formatting:
```
*📋 Yesterday:* Fixed auth bug, updated docs
*🚀 Today:* Stripe integration
*🚧 Blockers:* None
```

**Markdown** — for GitHub, Notion, etc:
```markdown
### Daily Standup

**Yesterday:**
Fixed auth bug, updated docs

**Today:**
Stripe integration

**Blockers:**
None
```

## How it works

1. Runs `git log --since="24 hours ago"` in your current directory
2. Prompts you for today's focus and any blockers
3. Formats and prints your standup

> **Tip:** Run it from your project root for best results. Works with any git repo.

## Roadmap (v1 ideas)

- [ ] Copy to clipboard automatically
- [ ] Support multiple repos
- [ ] `.standuprc` config file for team name, format preference
- [ ] Weekly summary mode

## License

MIT © [Muhammad Talha Khan](https://github.com/muhtalhakhan)