GS1 GPC

User Guide

  • Installation
    • Requirements
    • Installing from PyPI
    • Installing from Source
    • PostgreSQL Support
    • Development Installation
  • Quickstart
    • Basic Usage
      • Basic Import
      • Download Latest Data
      • Specify Language
      • Custom Files
      • Export Database to SQL
      • Export Only (No Import)
      • PostgreSQL Support
    • Python API Usage
    • Basic Example
  • Command Line Interface
    • Commands
      • import-gpc
      • export-sql
    • Examples
      • Basic Import
      • Download Latest Data
      • Specify Language
      • Custom Files
      • Export Database to SQL
      • Export Only (No Import)
      • PostgreSQL Support
      • Verbose Logging
  • Database Schema
    • Tables
      • gpc_segments
      • gpc_families
      • gpc_classes
      • gpc_bricks
      • gpc_attribute_types
      • gpc_attribute_values
    • Example Queries
      • List all segments and families
      • List all hierarchy levels with limit
      • Filter by segment
  • Advanced Usage
    • PostgreSQL Support
    • Custom XML Files
    • Logging
    • Programmatic Usage
    • Using Models and Callbacks
    • Food Segment Example

API Reference

  • Database Module
    • DatabaseConnection
      • DatabaseConnection.__init__()
      • DatabaseConnection.connect()
      • DatabaseConnection.close()
      • DatabaseConnection.commit()
      • DatabaseConnection.rollback()
    • setup_database()
    • insert_segment()
    • insert_family()
    • insert_class()
    • insert_brick()
    • insert_attribute_type()
    • insert_attribute_value()
  • Parser Module
    • GPCParser
      • GPCParser.__init__()
      • GPCParser.process_xml()
    • process_gpc_xml()
  • Models Module
    • GPCModels
      • GPCModels.Segment
        • GPCModels.Segment.__init__()
      • GPCModels.Family
        • GPCModels.Family.__init__()
      • GPCModels.Class
        • GPCModels.Class.__init__()
      • GPCModels.Brick
        • GPCModels.Brick.__init__()
      • GPCModels.AttributeType
        • GPCModels.AttributeType.__init__()
      • GPCModels.AttributeValue
        • GPCModels.AttributeValue.__init__()
      • GPCModels.__init__()
  • Callbacks Module
    • GPCProcessedCallback
      • GPCProcessedCallback.on_segment_processed()
      • GPCProcessedCallback.on_family_processed()
      • GPCProcessedCallback.on_class_processed()
      • GPCProcessedCallback.on_brick_processed()
      • GPCProcessedCallback.on_attribute_type_processed()
      • GPCProcessedCallback.on_attribute_value_processed()
      • GPCProcessedCallback.on_processing_complete()
  • Downloader Module
    • GPCDownloader
      • GPCDownloader.__init__()
      • GPCDownloader.find_latest_xml_file()
      • GPCDownloader.download_latest_gpc_xml()
    • find_latest_xml_file()
    • download_latest_gpc_xml()
  • Exporter Module
    • GPCExporter
      • GPCExporter.__init__()
      • GPCExporter.dump_database_to_sql()
    • dump_database_to_sql()

Development

  • Contributing
    • Setting Up Development Environment
    • Code Style
    • Pull Request Process
    • Testing
    • Documentation
  • Testing
    • Running Tests
    • Writing Tests
    • Test Data
    • Continuous Integration
  • Releasing
    • Prerequisites
    • Version Numbering
    • Release Process
      • 2. Update Version Numbers
      • 3. Update Changelog
      • 4. Create a Pull Request (if working on a feature branch)
      • 5. Review and Merge the Pull Request
      • 6. Create and Push a Tag
      • 7. Automated GitHub Release and PyPI Publishing
    • Release Checklist
    • Post-Release
GS1 GPC
  • Search


© Copyright 2025, Michael McGarrah.

Built with Sphinx using a theme provided by Read the Docs.