Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
.. 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.
More types will soon be supported. PRs are welcome :)
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
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
Documentation <https://pybarcodes.readthedocs.io/en/latest/index.html>
_PyPi <https://pypi.org/project/pybarcodes/>
_FAQs
A Python barcode generator
We found that pybarcodes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.