pybarcodes


Namepybarcodes JSON
Version 0.7.5 PyPI version JSON
download
home_pagehttps://github.com/atbuy/pybarcodes
SummaryA Python barcode generator
upload_time2024-06-16 18:10:41
maintainerNone
docs_urlNone
authoratbuy
requires_python>=3.8.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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.6.0 or higher is required**

To install the library you can run the following command:

.. code:: sh

    # Linux/MacOS
    python3 -m pip install --upgrade pybarcodes

    # Windows
    py -3 -m pip install --upgrade 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": "https://github.com/atbuy/pybarcodes",
    "name": "pybarcodes",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "atbuy",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/af/99/c4482d5911083803625324d5b4ebabd8de5d6053d4fae1fce05604238ea1/pybarcodes-0.7.5.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.6.0 or higher is required**\n\nTo install the library you can run the following command:\n\n.. code:: sh\n\n    # Linux/MacOS\n    python3 -m pip install --upgrade pybarcodes\n\n    # Windows\n    py -3 -m pip install --upgrade 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 barcode generator",
    "version": "0.7.5",
    "project_urls": {
        "Homepage": "https://github.com/atbuy/pybarcodes"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2dd22d173c845692e3268aa134a4db705e2facd8d12715c270d3c61c0d00dd10",
                "md5": "9b0e9838d2b803ad172b53d0bd43dc88",
                "sha256": "817bd496497b4e84a241b2523a9f1dd6687d88af3b68cc069af6aad92048c83a"
            },
            "downloads": -1,
            "filename": "pybarcodes-0.7.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b0e9838d2b803ad172b53d0bd43dc88",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0",
            "size": 210664,
            "upload_time": "2024-06-16T18:10:40",
            "upload_time_iso_8601": "2024-06-16T18:10:40.169980Z",
            "url": "https://files.pythonhosted.org/packages/2d/d2/2d173c845692e3268aa134a4db705e2facd8d12715c270d3c61c0d00dd10/pybarcodes-0.7.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af99c4482d5911083803625324d5b4ebabd8de5d6053d4fae1fce05604238ea1",
                "md5": "c45d9e218b0b389df23d219c8f5c49e5",
                "sha256": "398aaeda28a26af85357ff8d4fcd91368f5880e974d3107cc99272056a618244"
            },
            "downloads": -1,
            "filename": "pybarcodes-0.7.5.tar.gz",
            "has_sig": false,
            "md5_digest": "c45d9e218b0b389df23d219c8f5c49e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0",
            "size": 211738,
            "upload_time": "2024-06-16T18:10:41",
            "upload_time_iso_8601": "2024-06-16T18:10:41.695579Z",
            "url": "https://files.pythonhosted.org/packages/af/99/c4482d5911083803625324d5b4ebabd8de5d6053d4fae1fce05604238ea1/pybarcodes-0.7.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-16 18:10:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "atbuy",
    "github_project": "pybarcodes",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pybarcodes"
}
        
Elapsed time: 0.30228s