teafyi
v0.1.0
Published
TypeScript API client for TeaFYI -- tea varieties, teaware, brewing parameters, and processing methods. Zero dependencies.
Maintainers
Readme
teafyi
TypeScript API client for TeaFYI -- the comprehensive tea reference with 60 tea varieties across 6 categories, 15 teaware items, health compounds, and 120 expert guides covering oxidation science, processing methods, and brewing parameters. Zero dependencies, uses native fetch.
Explore tea at teafyi.com -- Varieties | Teaware | Origins | API Docs
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Reference
- TypeScript Types
- Learn More About Tea
- Also Available for Python
- Beverage FYI Family
- License
Install
npm install teafyiWorks in Node.js, Deno, Bun, and browsers (ESM).
Quick Start
import { TeaFYI } from "teafyi";
const api = new TeaFYI();
// Search tea varieties, categories, teaware, glossary
const results = await api.search("matcha");
// Get tea variety detail with brewing parameters
const matcha = await api.variety("matcha");
console.log(matcha.brewing); // { temperature: "70-80C", amount: "2g per 60ml" }
// Get teaware detail
const gaiwan = await api.teaware("gaiwan");
console.log(gaiwan.best_for); // ["Universal", "gongfu brewing"]
// Compare two varieties
const comparison = await api.compare("sencha", "matcha");What You Can Do
Tea Categories by Oxidation
All true tea comes from Camellia sinensis. The vast differences between a delicate white tea and a robust black tea are created through processing, particularly oxidation:
| Category | Oxidation | Characteristics | |----------|-----------|-----------------| | Green | 0-5% | Vegetal, grassy, sweet, bright green | | White | 0-10% | Delicate, floral, honey, subtle | | Yellow | 5-15% | Mellow, smooth, less grassy than green | | Oolong | 15-85% | Complex range from floral to toasty | | Black | 85-100% | Malty, robust, tannic, amber-red | | Pu-erh | Post-fermented | Earthy, woody, ages for decades |
Learn more: Tea Categories -- Tea Encyclopedia
Teaware
15 teaware items with materials, origins, and recommended uses:
| Teaware | Material | Best For | |---------|----------|----------| | Gaiwan | Porcelain | Universal, gongfu brewing | | Yixing Teapot | Zisha clay | Oolong, Pu-erh | | Kyusu | Ceramic | Japanese green tea | | Chasen | Bamboo whisk | Matcha preparation |
Learn more: Teaware Guide
Key Tea Concepts
| Concept | Description | |---------|-------------| | First Flush | First spring harvest, prized for freshness | | Gongfu Cha | Small vessel, high leaf ratio, multiple infusions | | L-Theanine | Amino acid promoting calm alertness | | Caffeine | Varies: matcha ~70mg, white ~15-30mg per cup |
API Reference
| Method | Description |
|--------|-------------|
| search(query) | Search varieties, categories, teaware, glossary |
| glossaryTerm(slug) | Get glossary term definition |
| variety(slug) | Tea variety detail with brewing parameters |
| category(slug) | Tea category detail |
| compound(slug) | Health compound detail |
| teaware(slug) | Teaware detail with materials, use |
| country(slug) | Origin country detail |
| compare(slugA, slugB) | Compare two tea varieties |
| random() | Random tea variety |
TypeScript Types
import type { SearchResult, GlossaryTerm, VarietyDetail, CategoryDetail, CompoundDetail, TeawareDetail, CountryDetail, CompareResult, RandomResult } from "teafyi";Learn More About Tea
- Reference: Tea Varieties | Teaware | Origins
- Guides: Tea Guides | Glossary
- API: Developer Docs | OpenAPI Spec
- Python: PyPI Package
Also Available for Python
pip install teafyiSee the Python package on PyPI.
Beverage FYI Family
Part of the FYIPedia open-source developer tools ecosystem -- world beverages from cocktails to sake.
| Package | PyPI | npm | Description | |---------|------|-----|-------------| | cocktailfyi | PyPI | npm | 636 cocktails, ABV, calories -- cocktailfyi.com | | vinofyi | PyPI | npm | Wines, grapes, regions, food pairings -- vinofyi.com | | beerfyi | PyPI | npm | 112 beer styles, hops, malts -- beerfyi.com | | brewfyi | PyPI | npm | 72 coffee varieties, brew methods -- brewfyi.com | | whiskeyfyi | PyPI | npm | 80 whiskey expressions, distilleries -- whiskeyfyi.com | | teafyi | PyPI | npm | 60 tea varieties, teaware -- teafyi.com | | nihonshufyi | PyPI | npm | 80 sake, rice varieties -- nihonshufyi.com |
License
MIT
