orsinium-labs / gpcc

Python library and CLI tool to fetch information from GCP Browser (https://gpc-browser.gs1.org/)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gpcc

Python library and CLI tool to fetch information from GCP Browser.

This is a standardized classifier of products used across companies. The classification, however, cannot be inferred from the product barcode or even packaging. Companies use it only internally.

Installation

python3 -m pip install gpcc

CLI usage

# download latest JSONs for all languages
python3 -m gpcc

# download latest JSON for a specified language
python3 -m gpcc --lang nl

# download into a specified directory
python3 -m gpcc --output ./gpc-dump/

Python usage

import asyncio
import gpcc
from pathlib import Path

async def run():
    langs = await gpcc.get_languages()
    output = Path('gpc-dump')
    await gpcc.fetch_files(output, langs)

asyncio.run(run())

About

Python library and CLI tool to fetch information from GCP Browser (https://gpc-browser.gs1.org/)

License:MIT License


Languages

Language:Python 100.0%