Skip to main content

Python bindings for ggtag

Project description

Python bindings for ggtag.

Installation

pip install ggtag

Usage

The GGTag class provides a simple interface for creating and rendering tags. The tag can be rendered as a bitmap or encoded as byte array.

Here is an example how to create a tag and encode it to byte array:

tag = ggtag.GGTag()
tag.text(204, 122, 3, "ggtag")
tag.icon(212, 81, 34, "wifi")
tag.rect(198, 74, 70, 70)
tag.rect(68, 74, 82, 82)
tag.qrcode(71, 77, 3, "https://ggtag.io/demo.html")
tag.text(43, 186, 5, "https://ggtag.io")
data = bytes(tag)

The byte array can be programmed into a ggtag device using either:

  • data over sound and the the ggwave library
  • serial USB connection and the pyserial library.

See demo.py for a complete demo.

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

ggtag-0.1.2.tar.gz (292.0 kB view details)

Uploaded Source

File details

Details for the file ggtag-0.1.2.tar.gz.

File metadata

  • Download URL: ggtag-0.1.2.tar.gz
  • Upload date:
  • Size: 292.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for ggtag-0.1.2.tar.gz
Algorithm Hash digest
SHA256 795a10039dd95ebaf6a0434b242a0bd396d6a6af675972241f21608415ae7361
MD5 aad2934f9e157be4f05794d3ee01626a
BLAKE2b-256 20f15e257fd8e24c14e9a7ce028cf9fa6364167bb125f8ed7e5fb71cbe7b6e10

See more details on using hashes here.

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