Metadata-Version: 2.4
Name: pybarcodes
Version: 1.2.2
Summary: A Python package for barcode generation
Author-email: atbuy <buy@atbuy.dev>
License-Expression: MIT
Project-URL: Homepage, https://github.com/atbuy/pybarcodes
Project-URL: Repository, https://github.com/atbuy/pybarcodes
Project-URL: Bug Tracker, https://github.com/atbuy/pybarcodes/issues
Project-URL: Source Code, https://github.com/atbuy/pybarcodes
Project-URL: CI/CD, https://github.com/atbuy/pybarcodes/actions
Keywords: barcode,scanner,generator,ean13,code39,jan,python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: pillow<13,>8
Dynamic: license-file

pybarcodes
==========

.. image:: https://readthedocs.org/projects/pybarcodes/badge/?version=latest
    :target: https://pybarcodes.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status


.. image:: https://img.shields.io/pypi/v/pybarcodes.svg
    :target: https://pypi.python.org/pypi/pybarcodes
    :alt: PyPI version info


.. image:: https://img.shields.io/pypi/pyversions/pybarcodes.svg
    :target: https://pypi.python.org/pypi/pybarcodes
    :alt: 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:

.. code:: bash

    pip install pybarcodes


Quick Example
--------------

You can see what barcodes are supported

.. code:: py

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



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

.. code:: py

    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.

.. code:: py

    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:: https://i.imgur.com/wd7jyIx.png
    :target: https://i.imgur.com/wd7jyIx.png
    :alt: Image of Barcode


Links
------

- `Documentation <https://pybarcodes.readthedocs.io/en/latest/index.html>`_
- `PyPi <https://pypi.org/project/pybarcodes/>`_
