Metadata-Version: 2.4
Name: barcodefyi
Version: 0.1.0
Summary: Barcode symbology encyclopedia API client — look up UPC, EAN, Code 128, QR, Data Matrix formats, standards, and specifications from BarcodeFYI.
Project-URL: Homepage, https://barcodefyi.com
Project-URL: Symbology Explorer, https://barcodefyi.com/symbology/
Project-URL: Standards Reference, https://barcodefyi.com/standard/
Project-URL: Documentation, https://barcodefyi.com/developers/
Project-URL: Repository, https://github.com/fyipedia/barcodefyi
Project-URL: Issues, https://github.com/fyipedia/barcodefyi/issues
Project-URL: Changelog, https://github.com/fyipedia/barcodefyi/releases
Author: FYIPedia
License-Expression: MIT
License-File: LICENSE
Keywords: api-client,barcode,code-128,data-matrix,ean,gs1,isbn,reference,symbology,upc
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: httpx>=0.27; extra == 'all'
Requires-Dist: mcp>=1.0; extra == 'all'
Requires-Dist: rich>=13.0; extra == 'all'
Requires-Dist: typer>=0.15; extra == 'all'
Provides-Extra: api
Requires-Dist: httpx>=0.27; extra == 'api'
Provides-Extra: cli
Requires-Dist: rich>=13.0; extra == 'cli'
Requires-Dist: typer>=0.15; extra == 'cli'
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == 'mcp'
Description-Content-Type: text/markdown

# barcodefyi

[![PyPI](https://img.shields.io/pypi/v/barcodefyi)](https://pypi.org/project/barcodefyi/)
[![Python](https://img.shields.io/pypi/pyversions/barcodefyi)](https://pypi.org/project/barcodefyi/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

Barcode symbology encyclopedia API client for Python. Look up 50+ barcode formats, 30 standards, anatomy components, and GS1 prefixes from [BarcodeFYI](https://barcodefyi.com) -- the comprehensive barcode reference covering UPC, EAN, Code 128, QR Code, Data Matrix, PDF417, and every major symbology in commercial and industrial use.

> **Explore barcodes at [barcodefyi.com](https://barcodefyi.com)** -- [Symbology Explorer](https://barcodefyi.com/symbology/) | [Standards Reference](https://barcodefyi.com/standard/) | [Anatomy Guide](https://barcodefyi.com/anatomy/) | [GS1 Prefixes](https://barcodefyi.com/prefix/)

## Install

```bash
pip install barcodefyi[api]     # API client (httpx)
pip install barcodefyi[cli]     # + CLI (typer, rich)
pip install barcodefyi[mcp]     # + MCP server
pip install barcodefyi[all]     # Everything
```

## Quick Start

```python
from barcodefyi.api import BarcodeFYI

with BarcodeFYI() as api:
    # Search symbologies, standards, components, glossary
    results = api.search("upc")
    print(results)

    # Look up a specific symbology
    upc = api.symbology("upc-a")
    print(upc["name"], upc["year_introduced"])

    # Compare two symbologies
    diff = api.compare("upc-a", "ean-13")
    print(diff)

    # Discover a random symbology
    surprise = api.random()
    print(surprise["name"])
```

## What You'll Find on BarcodeFYI

BarcodeFYI is a comprehensive barcode symbology encyclopedia covering 50+ formats across 1D linear, 2D matrix, stacked, and composite categories. Barcodes are machine-readable optical labels that encode data using patterns of bars, spaces, dots, or modules -- the foundation of supply chain management, retail checkout, healthcare tracking, and industrial automation worldwide.

### Symbology Categories

| Category | Examples | Data Type |
|----------|----------|-----------|
| 1D Linear | UPC-A, EAN-13, Code 128, Code 39 | Numeric or alphanumeric |
| 2D Matrix | QR Code, Data Matrix, Aztec Code | Binary, text, URLs |
| Stacked | PDF417, Code 49, Codablock F | High-density alphanumeric |
| Postal | POSTNET, Royal Mail 4-State, Intelligent Mail | Address routing |
| Composite | GS1 DataBar Composite, CC-A/B/C | Combined 1D+2D |

### Key Barcode Standards

| Standard | Organization | Scope |
|----------|-------------|-------|
| ISO/IEC 15420 | ISO | EAN/UPC symbology specification |
| ISO/IEC 15417 | ISO | Code 128 and GS1-128 |
| ISO/IEC 16022 | ISO | Data Matrix symbology |
| ISO/IEC 18004 | ISO | QR Code specification |
| GS1 General Specifications | GS1 | Global supply chain standards |

### Barcode Anatomy

Every barcode consists of fundamental components: quiet zones (mandatory whitespace margins), start/stop characters (format identifiers), data characters (encoded payload), check digits (error detection), and for 2D codes -- finder patterns, timing patterns, and error correction codewords.

Learn more: [Anatomy Explorer](https://barcodefyi.com/anatomy/) | [Check Digit Algorithms](https://barcodefyi.com/check-digit/)

## API Endpoints

Free, no authentication required. JSON responses with CORS enabled.

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/symbology/{slug}/` | Barcode symbology detail with specs |
| GET | `/api/family/{slug}/` | Symbology family with evolution story |
| GET | `/api/standard/{slug}/` | Standard detail with linked symbologies |
| GET | `/api/component/{slug}/` | Anatomy component detail |
| GET | `/api/term/{slug}/` | Glossary term definition |
| GET | `/api/search/?q={query}` | Search across all content types |
| GET | `/api/compare/?a={slug}&b={slug}` | Compare two symbologies |
| GET | `/api/random/` | Random symbology discovery |
| GET | `/api/industry/{slug}/` | Industry barcode usage |
| GET | `/api/openapi.json` | OpenAPI 3.1.0 specification |

```bash
# Example: search for UPC formats
curl -s "https://barcodefyi.com/api/search/?q=upc" | python -m json.tool
```

## Command-Line Interface

```bash
barcodefyi search "code 128"
barcodefyi symbology upc-a
barcodefyi compare upc-a ean-13
barcodefyi random
```

## MCP Server (Claude, Cursor, Windsurf)

```json
{
    "mcpServers": {
        "barcodefyi": {
            "command": "python",
            "args": ["-m", "barcodefyi.mcp_server"]
        }
    }
}
```

Tools: `barcode_search`, `barcode_lookup`, `barcode_compare`

## API Client

```python
from barcodefyi.api import BarcodeFYI

with BarcodeFYI() as api:
    # All 10 endpoints
    api.search("upc")
    api.symbology("upc-a")
    api.family("1d-linear")
    api.standard("iso-iec-15420")
    api.component("quiet-zone")
    api.glossary_term("symbology")
    api.compare("upc-a", "ean-13")
    api.random()
    api.industry("retail")
    api.openapi()
```

## Also Available

| Language | Package | Install |
|----------|---------|---------|
| Python | [barcodefyi](https://pypi.org/project/barcodefyi/) | `pip install barcodefyi` |
| TypeScript | [barcodefyi](https://www.npmjs.com/package/barcodefyi) | `npm install barcodefyi` |
| Go | [barcodefyi-go](https://pkg.go.dev/github.com/fyipedia/barcodefyi-go) | `go get github.com/fyipedia/barcodefyi-go` |
| Rust | [barcodefyi](https://crates.io/crates/barcodefyi) | `cargo add barcodefyi` |
| Ruby | [barcodefyi](https://rubygems.org/gems/barcodefyi) | `gem install barcodefyi` |

## Code FYI Family

| Site | Domain | Focus |
|------|--------|-------|
| BarcodeFYI | [barcodefyi.com](https://barcodefyi.com) | Barcode symbologies & standards |
| QRCodeFYI | [qrcodefyi.com](https://qrcodefyi.com) | QR code types & encoding |
| NFCFYI | [nfcfyi.com](https://nfcfyi.com) | NFC tags & NDEF records |
| BLEFYI | [blefyi.com](https://blefyi.com) | Bluetooth Low Energy profiles |
| RFIDFYI | [rfidfyi.com](https://rfidfyi.com) | RFID tags & frequency bands |
| SmartCardFYI | [smartcardfyi.com](https://smartcardfyi.com) | Smart card types & platforms |

## License

MIT
