Skip to main content
Documentation Status PyPI version info PyPI supported Python versions

This is a Python package to create barcodes. You can create file-like objects, text files and images from just a barcode number. Image generation is fast so it can be used to create images in bulk.

Supported Barcode Types

  • EAN13

  • EAN8

  • EAN14

  • JAN

  • CODE39

More types will soon be supported. PRs are welcome :)

Installing

Python 3.10 or higher is required

To install the library you can run the following command:

pip install pybarcodes

Quick Example

You can see what barcodes are supported

>>> import pybarcodes
>>> pybarcodes.SUPPORTED_BARCODES
['EAN13', 'EAN8', 'EAN14', 'JAN', 'CODE39']

And you can use this to view the barcode that was generated:

from pybarcodes import EAN13

CODE = "012345678905"
barcode = EAN13(CODE)
barcode.show()

This is pretty much all the code you need to generate a barcode.

Saving an image of the barcode is pretty straightforward.

from pybarcodes import EAN14

barcode = EAN14("40700719670720")

# Saves the image in PNG format
barcode.save("myimage.png")

# You can also resize it.
barcode.save("myimage2.png", size=(100000, 1000000))

EAN13 output from example 2:

Image of Barcode

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybarcodes-1.2.4.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybarcodes-1.2.4-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file pybarcodes-1.2.4.tar.gz.

File metadata

  • Download URL: pybarcodes-1.2.4.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pybarcodes-1.2.4.tar.gz
Algorithm Hash digest
SHA256 fb379cc04d3194f8defbe203679ac0cb49602168a1583a59ffa543b5a8456fbd
MD5 15d14ccbf9c812cb1bf7c1665f130e45
BLAKE2b-256 5a7cbcaca20cc09e165a62d49b255cced527de73c49a9e502a85147b97a21827

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybarcodes-1.2.4.tar.gz:

Publisher: python-publish.yml on atbuy/pybarcodes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pybarcodes-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: pybarcodes-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pybarcodes-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c6269199b642f3a2a0b533e775ebe634ed6dec13192be5e02fb7a181bff8c6e
MD5 3a7ea47fbdd65f39d99933595556f4ee
BLAKE2b-256 45b640b23a4d101794f74994c00f6146c12572b98728e1edbc77e4ba322008e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybarcodes-1.2.4-py3-none-any.whl:

Publisher: python-publish.yml on atbuy/pybarcodes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.2.4 This release

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.7.5

2 files

0.7.2

2 files

0.6.5

2 files

0.6.3

2 files

0.5.4

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.3.3

2 files

0.3.2

2 files

0.2.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page