bean-lens
Extract structured coffee bean info from package or card images using Vision LLM.
Installation
pip install bean-lens
Or with uv:
uv add bean-lens
Setup
Get a Gemini API key from Google AI Studio and set it as an environment variable:
export GEMINI_API_KEY=your-api-key
Usage
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
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:
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
Metadata
Release files for bean-lens 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bean_lens-0.1.0.tar.gz | 4.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bean_lens-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / bean_lens-0.1.0.tar.gz
| Download URL | bean_lens-0.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61d1b9a3e36d680ec4abc0618bc52e70c3d58922cc96e4cb9decb84e3709f86a
|
|
BLAKE2b-256 checksum How to use checksums |
631a47e124d6343f6a5f4eadd254f5c9e612ecd9bff6e5b6a5492744c09dd7a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / bean_lens-0.1.0-py3-none-any.whl
| Download URL | bean_lens-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0e7445a1cb75c0bdefbf266d045f374601eccb3c4f3aac919aaad74c5150a57
|
|
BLAKE2b-256 checksum How to use checksums |
001e63dc8851005458eeaed5f3101d3c68caf75b09124884d75ac7de67f60c07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for bean-lens 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.