Skip to main content

pybarcodes

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.5

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.5
File Size Uploaded Provenance Actions
pybarcodes-1.2.5.tar.gz 13.4 kB With provenance Details for pybarcodes-1.2.5.tar.gz

Built distribution (wheel)

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

Total release size: 26.1 kB

Release files / pybarcodes-1.2.5.tar.gz

Download URL pybarcodes-1.2.5.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bef35135bb7e28f34f5bac95f97b2695b926b4c05bf8359a18236e1a63e0d67d
BLAKE2b-256 checksum
How to use checksums
e4d2b152a9f12f59f480436beba3160ae482e0ab844f97c650c39cd3ffae7b19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

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

Download URL pybarcodes-1.2.5-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71efa5a1ace6ff00322fea325af74f57a928cee5f4de9ee2993e13dc853e346e
BLAKE2b-256 checksum
How to use checksums
2771016f8b227c2b4cc1e8507559cbe26453d30b33a55cd7d85a831beac41220
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Security for pybarcodes 1.2.5

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pybarcodes-1.2.5.tar.gz

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 Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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