Skip to main content

Aztec Code generator in Python

Project description

Aztec Code generator in Python

Dependencies

Pillow - Python Imaging Library

Usage

data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.save('aztec_code.png', module_size=4)

This code will generate an image file aztec_code.png of an Aztec Code containing the text “Aztec Code 2D :)”.

Aztec Code with data
data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.print_out()

This code will print out the resulting 19×19 (compact) Aztec Code to standard output as text.

      ##  # ## ####
 #   ## #####  ###
 #  ##  # #   # ###
## #  #    ## ##
    ## # #    # #
## ############ # #
 ### #       ###  #
##   # ##### # ## #
 #   # #   # ##
 # # # # # # ###
    ## #   # ## ##
#### # ##### ## #
  # ##       ## ##
 ##  ########### #
  ##    # ##   ## #
     ## # ### #  ##
      ############
##   #     # ##   #
##  #    ## ###   #

Authors

Written by Dmitry Alimov (delimtry) and packaged by Daniel Lenski (dlenski).

License

Released under The MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aztec_code_generator-0.3.tar.gz (11.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page