Code Monkey home page Code Monkey logo

py-qr-barcode-generator's Introduction

QR and CODE128 generator

Docker Image CI

This Python 3.11. function is intended to create QR codes as well as CODE128 barcodes as PNG files.

It runs as a serverless function and is built upon Googles' function-framework.

To create barcodes, I use treepoem which is a wrapper around BWIPP and Ghostscript.

Disclaimer: This code is intended for learning on how to create file buffers and returning them within web servers. I am not responsible if you break something using this.

Running locally

To run and debug your function locally, install the functions-framework:

  pip install functions-framework

And then start up a local development server:

  functions-framework --target entrypoint --debug

Containerized

You can package the function into a slim container and run it from there. I pre-built a container version from the Dockerfile inside this repository.

  docker run -ti --rm --port 8080:8080 torbendury/qr-barcode-generator:latest

If you would like to build the container yourself, enter the following command into your terminal:

  docker build -t torbendury/qr-barcode-generator:latest

Security

For security scans, I use bandit. This is a tool that used to be maintained by the OpenStack, but was moved to PyCQA and resides here.

Here is the latest output:

Run started:2022-12-06 20:01:06.542299

Test results:
        No issues identified.

Code scanned:
        Total lines of code: 47
        Total lines skipped (#nosec): 0

Run metrics:
        Total issues (by severity):
                Undefined: 0
                Low: 0
                Medium: 0
                High: 0
        Total issues (by confidence):
                Undefined: 0
                Low: 0
                Medium: 0
                High: 0
Files skipped (0):

Contributing

Contributions are always welcome! If you'd like to contribute, fork the repository and create a pull request. If you have any other considerations, open up a GitHub issue.

Links

py-qr-barcode-generator's People

Contributors

torbendury avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.