semvec/pypi-packages huggingface dataset:
bean-lens 0.1.0
Extract structured coffee bean info from package or card images using Vision LLM
License: MIT
Requires Python: >=3.13
Keywords: coffee, ocr, vision, llm, bean, gemini

# bean-lens

Extract structured coffee bean info from package or card images using Vision LLM.

## Installation

```bash
pip install bean-lens
```

Or with [uv](https://github.com/astral-sh/uv):

```bash
uv add bean-lens
```

## Setup

Get a Gemini API key from [Google AI Studio](https://aistudio.google.com/apikey) and set it as an environment variable:

```bash
export GEMINI_API_KEY=your-api-key
```

## Usage

### Python

```python
from bean_lens import extract

result = extract("coffee_package.jpg")

print(result.roastery)        # "Fritz Coffee"
print(result.origin.country)  # "Ethiopia"
print(result.flavor_notes)    # ["Citrus", "Jasmine", "Honey"]
```

### CLI

```bash
bean-lens image.jpg
```

Output:
```
  bean-lens

  Roastery:      Fritz Coffee
  Name:          Ethiopia Yirgacheffe
  Origin:        Ethiopia / Yirgacheffe / Konga
  Variety:       Heirloom
  Process:       Washed
  Roast Level:   Light
  Flavor Notes:  Citrus, Jasmine, Honey
  Roast Date:    2024.01.15
  Altitude:      1,800-2,000m
```

JSON output:
```bash
bean-lens image.jpg --json
```

## Extracted Fields

| Field | Description |
|-------|-------------|
| `roastery` | Roastery or brand name |
| `name` | Coffee bean name |
| `origin` | Origin info (country, region, farm) |
| `variety` | Coffee varieties (e.g., Geisha, Typica) |
| `process` | Processing method (e.g., Washed, Natural) |
| `roast_level` | Roast level (e.g., Light, Medium, Dark) |
| `flavor_notes` | Flavor notes list |
| `roast_date` | Roast date |
| `altitude` | Growing altitude |

## License

MIT
trivy-py-ecc 0.69.1.1
Python wrapper around invoking trivy (https://trivy.dev/)
License: MIT
Requires Python: >=3.9

[![build status](https://github.com/eccenca/pre-commit-mirrors-trivy/actions/workflows/main.yml/badge.svg)](https://github.com/eccenca/pre-commit-mirrors-trivy/actions/workflows/main.yml)

# trivy-py-ecc

A python wrapper to provide a pip-installable [trivy] binary.

Internally this package provides a convenient way to download the pre-built
trivy binary for your particular platform.

### installation

```bash
pip install trivy-py-ecc
```

### usage

After installation, the `trivy` binary should be available in your
environment (or `trivy.exe` on windows).

### As a pre-commit hook

See [pre-commit] for instructions

Sample `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/GaukeT/pre-commit-mirrors-trivy
  rev: v0.69.1.0
  hooks:
    - id: trivy-fs
      args:
        - --exit-code=1 # Example: set exit with code 1
        - --debug # Example: enable debug output
        - . # Example: scan current directory (provide DIR as last argument if `args` are used)
    - id: trivy-config
```

[trivy]: https://trivy.dev/
[pre-commit]: https://pre-commit.com