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

Metadata

Release files for pybarcodes 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybarcodes 1.2.4
File Size Uploaded
pybarcodes-1.2.4.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybarcodes 1.2.4
File Interpreter ABI Platform
pybarcodes-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 26.0 kB

Release files / pybarcodes-1.2.4.tar.gz

Download URL pybarcodes-1.2.4.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fb379cc04d3194f8defbe203679ac0cb49602168a1583a59ffa543b5a8456fbd
BLAKE2b-256 checksum
How to use checksums
5a7cbcaca20cc09e165a62d49b255cced527de73c49a9e502a85147b97a21827
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

Release files / pybarcodes-1.2.4-py3-none-any.whl

Download URL pybarcodes-1.2.4-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c6269199b642f3a2a0b533e775ebe634ed6dec13192be5e02fb7a181bff8c6e
BLAKE2b-256 checksum
How to use checksums
45b640b23a4d101794f74994c00f6146c12572b98728e1edbc77e4ba322008e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.4 This release

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.7.5

2 release files

0.7.2

2 release files

0.6.5

2 release files

0.6.3

2 release files

0.5.4

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page