lists.arthurdejong.org
RSS feed

Parsing GS1-128

[Date Prev][Date Next] [Thread Prev][Thread Next]

Parsing GS1-128



Hi all,

We have the need to parse GS1-128 [1] codes in order to extract it's application data. This data can be for example:  a product code (EAN-13) but also  the Lot number, Due date, package data. Here is the full list of available information [2].

We are interested on parsing a code and obtaining the correct data types on python. So for example, parsing:

01 12345678901234 11 190102 17 190104  
(Note that I included spaces for clarification but GS1-128 does not include spaces)

We want to obtain something like:

data = {
 '01': '12345678901234',
 '11': datetime.date(2019, 01, 02),
 '17': datetime.date(2019, 01, 04),
}

Do you think this will fit into python-stdnum library?

I'm not requesting current maintainers to implement it, just asking if this will be a good addition for the library before submitting a patch for it.

I will be happy to answer any questions that my rise for this topic.

Regards,


[1] https://en.wikipedia.org/wiki/GS1-128

[2] https://en.wikipedia.org/wiki/GS1-128#Full_list_of_Application_Identifiers

-- 
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk