
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Library for encoding/decoding and representing GS1 Electronic Product Codes
pip install epc-encoding-utils
Library for encoding/decoding and representing GS1 Electronic Product Codes (EPCs). It supports the following encoding schemes:
The library's goal is to abstract away much of the complexity of converting between tag representations, and make generating tags and barcodes simple.
https://epcpy-tools.readthedocs.io/en/latest/index.html
Create a new GID encoded tag
>>> from epc.schemes import GID
>>> tag = GID()
>>> tag.manager_number(31231).object_class(11).serial_number(12)
<epc.schemes.GID urn:epc:id:gid:31231.11.12>
>>> hex(tag)
'0x3500079ff00000b00000000c'
>>> tag.tag_uri
'urn:epc:tag:gid-96:31231.11.12'
Generate GIAI barcode from/to a hexadecimal tag data representation
>>> from epc.schemes import GIAI
>>> tag = GIAI(epc='0x341401388000000000000001')
>>> tag.barcode
'800400200001'
>>> tag.barcode_humanized
'(8004) 0020000 1'
>>> tag = GIAI(barcode='800400200001', company_prefix_length=7)
>>> hex(tag)
'0x341401388000000000000001'
Decode an EPC data tag with unknown encoding
>>> from epc.utils import decode_epc
>>> tag = decode_epc('341401388000000000000001') # '0x' prefix is optional
>>> print(tag)
<epc.schemes.GIAI urn:epc:id:giai:0020000.1>
This library was built based on the Tag Data Standard v1.11.
python -m unittest discover -s epc/schemes/tests
FAQs
Library for encoding/decoding and representing GS1 Electronic Product Codes
We found that epc-encoding-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.