Giter VIP home page Giter VIP logo

qpyr's Introduction

PyPI - Downloads PyPI Latest Release codecov

QPYR - QR Code Generation in Python

Python package designed for creating QR codes with support for all QR code versions from 1 to 40. Designed for developers looking for a simple way to integrate QR code generation into their Python applications ๐Ÿš€๐Ÿš€๐Ÿš€.

Installation

pip install qpyr

Basic usage

To use the package, import and call the main function:

# Save qrcode as image
import qpyr
qpyr.main("google.com", filepath="qr1.png")
# Show qrcode as image
import qpyr
qpyr.main("google.com", show_image=True)

QR Code

Contributing

Contributions are warmly welcomed! Whether you're tackling a bug, adding a new feature, or improving documentation, your input is invaluable in making this library better.

qpyr's People

Contributors

dependabot[bot] avatar sabi-h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qpyr's Issues

Can not create QR code with more than 2331 characters

>>> from qpyr import main
>>> main("a" * 2331)
array([[0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       ...,
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0]])
>>> main("a" * 2332)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/qpyr/qpyr/main.py", line 6, in main
    version, binary_str = encode(data, ecl=ecl)
                          ^^^^^^^^^^^^^^^^^^^^^
  File "/qpyr/qpyr/encode.py", line 111, in encode
    version = get_best_version(data_segment, mode, ecl)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/qpyr/qpyr/encode.py", line 71, in get_best_version
    raise ValueError("Data too long")
ValueError: Data too long
>>> 

No support for Latin Extended-A characters

Characters beyond Latin-1 are not supported. For example the first character from Latin Extended-A throws ValueError: Mode not supported.

>>> from qpyr import main
>>> main("ฤ€")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/qpyr/qpyr/main.py", line 6, in main
    version, binary_str = encode(data, ecl=ecl)
                          ^^^^^^^^^^^^^^^^^^^^^
  File "/qpyr/qpyr/encode.py", line 106, in encode
    mode = get_best_mode(data)
           ^^^^^^^^^^^^^^^^^^^
  File "/qpyr/qpyr/encode.py", line 26, in get_best_mode
    raise ValueError("Mode not supported")
ValueError: Mode not supported

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.