Downloader Module

GPC data downloading functionality.

This module provides functions for downloading GS1 GPC data from the GS1 API and finding the latest cached XML files.

gs1_gpc.downloader.find_latest_xml_file(directory='/home/docs/checkouts/readthedocs.org/user_builds/gs1-gpc/checkouts/v0.2.1/data/imports', language_code='en')[source]

Find the latest GPC XML file in the specified directory.

Parameters:
  • directory (str) – Directory to search for XML files

  • language_code (str) – Language code to filter files

Returns:

Path to the latest XML file or None if no files found

Return type:

str

gs1_gpc.downloader.download_latest_gpc_xml(language_code='en')[source]

Download the latest GS1 GPC data in XML format.

Parameters:

language_code – Language code to download

Returns:

Path to the XML file to use for import

Return type:

str