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 and read 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.9 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/>`_
Raw data
{
"_id": null,
"home_page": null,
"name": "pybarcodes",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "barcode, scanner, generator, ean13, code39, jan, python",
"author": "atbuy",
"author_email": "buy@atbuy.dev",
"download_url": "https://files.pythonhosted.org/packages/15/91/8a973c26532851786fe6c617c72235eb2fc5adc411b278f2d61e07a5999f/pybarcodes-1.0.1.tar.gz",
"platform": null,
"description": "pybarcodes\n==========\n\n.. image:: https://readthedocs.org/projects/pybarcodes/badge/?version=latest\n :target: https://pybarcodes.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n.. image:: https://img.shields.io/pypi/v/pybarcodes.svg\n :target: https://pypi.python.org/pypi/pybarcodes\n :alt: PyPI version info\n\n\n.. image:: https://img.shields.io/pypi/pyversions/pybarcodes.svg\n :target: https://pypi.python.org/pypi/pybarcodes\n :alt: PyPI supported Python versions\n\n\nThis is a python package to create and read barcodes\nYou can create file-like objects, text files and images from just a barcode number.\nImage generation is fast so it can be used to create images in bulk.\n\n\nSupported Barcode Types\n------------------------\n\n- EAN13\n- EAN8\n- EAN14\n- JAN\n- CODE39\n\nMore types will soon be supported.\nPRs are welcome :)\n\n\nInstalling\n-----------\n\n**Python 3.9 or higher is required**\n\nTo install the library you can run the following command:\n\n.. code:: bash\n\n pip install pybarcodes\n\n\nQuick Example\n--------------\n\nYou can see what barcodes are supported\n\n.. code:: py\n\n >>> import pybarcodes\n >>> pybarcodes.SUPPORTED_BARCODES\n ['EAN13', 'EAN8', 'EAN14', 'JAN', 'CODE39']\n\n\n\nAnd you can use this to view the barcode that was generated:\n\n.. code:: py\n\n from pybarcodes import EAN13\n\n CODE = \"012345678905\"\n barcode = EAN13(CODE)\n barcode.show()\n\nThis is pretty much all the code you need to generate a barcode.\n\n\nSaving an image of the barcode is pretty straightforward.\n\n.. code:: py\n\n from pybarcodes import EAN14\n\n barcode = EAN14(\"40700719670720\")\n\n # Saves the image in PNG format\n barcode.save(\"myimage.png\")\n\n # You can also resize it.\n barcode.save(\"myimage2.png\", size=(100000, 1000000))\n\n\n\n\nEAN13 output from example 2:\n\n.. image:: https://i.imgur.com/wd7jyIx.png\n :target: https://i.imgur.com/wd7jyIx.png\n :alt: Image of Barcode\n\n\nLinks\n------\n\n- `Documentation <https://pybarcodes.readthedocs.io/en/latest/index.html>`_\n- `PyPi <https://pypi.org/project/pybarcodes/>`_\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for barcode generation",
"version": "1.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/atbuy/pybarcodes/issues",
"CI/CD": "https://github.com/atbuy/pybarcodes/actions",
"Homepage": "https://github.com/atbuy/pybarcodes",
"Repository": "https://github.com/atbuy/pybarcodes",
"Source Code": "https://github.com/atbuy/pybarcodes"
},
"split_keywords": [
"barcode",
" scanner",
" generator",
" ean13",
" code39",
" jan",
" python"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8fe936f955e52bbedf840e6ac04de0187ceb727af54067f00e3e8a5cf388fa4b",
"md5": "5d24478f22ee22c31f98f3e7113cc5c9",
"sha256": "83c6b190cf8ded3b78f07aa2ec092d193021e01a2d9182b633e646b61fabada4"
},
"downloads": -1,
"filename": "pybarcodes-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5d24478f22ee22c31f98f3e7113cc5c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 209825,
"upload_time": "2025-02-04T21:01:58",
"upload_time_iso_8601": "2025-02-04T21:01:58.941073Z",
"url": "https://files.pythonhosted.org/packages/8f/e9/36f955e52bbedf840e6ac04de0187ceb727af54067f00e3e8a5cf388fa4b/pybarcodes-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "15918a973c26532851786fe6c617c72235eb2fc5adc411b278f2d61e07a5999f",
"md5": "e7bc67bb9cfab9ef8c927800c18ac047",
"sha256": "e98b41a4a201b795e20d7fd6bc4ac8d21cbe6e144c64cad4c3cf40293c932c5e"
},
"downloads": -1,
"filename": "pybarcodes-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "e7bc67bb9cfab9ef8c927800c18ac047",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 208167,
"upload_time": "2025-02-04T21:02:01",
"upload_time_iso_8601": "2025-02-04T21:02:01.087597Z",
"url": "https://files.pythonhosted.org/packages/15/91/8a973c26532851786fe6c617c72235eb2fc5adc411b278f2d61e07a5999f/pybarcodes-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-04 21:02:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "atbuy",
"github_project": "pybarcodes",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pybarcodes"
}