GS1 GPC

A tool for importing GS1 Global Product Classification (GPC) data into SQL databases.

Documentation Status License

Key Features

  • Import GPC Data: Import GS1 GPC XML data into SQLite or PostgreSQL databases

  • Download Latest Data: Download the latest GPC data directly from GS1 API using the gpcc library

  • Automatic Fallback: Use the newest cached version if download is not available

  • SQL Export: Export database tables to SQL file for backup or migration

  • Database Portability: Support for both SQLite and PostgreSQL

  • Command-line Interface: Easy-to-use CLI with Click

Installation

Install from source:

git clone https://github.com/mcgarrah/gs1_gpc_python.git
cd gs1_gpc_python
pip install -r requirements.txt
pip install -e .

Quick Example

# Import GPC data
gpc import-gpc --download

# Export to SQL
gpc export-sql --db-file ./data/instances/gpc_data_xml.sqlite3

Contents

Indices and tables