Skip to content
Merged

V1 #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added IMGs/PyTexas_QR_Code_IMG_4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IMGs/PyTexas_QR_Code_IMG_5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
This README has not yet been upated as of 20260408. But will be and will be done through lessons from [here](https://realpython.com/python-generate-qr-code/).

---

# Python Development Toolkit

A comprehensive template and toolkit for Python projects with AI-assisted workflows, specification-driven development, and security-first patterns.
Expand Down
Binary file added hello_world_qr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[project]
name = "repo-template-python"
name = "python-qr"
version = "0.1.0"
description = "Template repo for Python projects and AI code generation support."
description = "A simple QR code generator for Python."
readme = "README.md"
requires-python = ">=3.14"
dependencies = []
dependencies = [
"qrcode-artistic>=3.0.2",
"segno>=1.6.6",
]

[dependency-groups]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@

segno
86 changes: 86 additions & 0 deletions src/basic_qrcode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# basic_qrcode.py

import segno
from pathlib import Path

def generate_qr_code_txt(
data: str = "Hello, World",
filename: str = "hello_world_qr.png",
scale: int = 1, border: int = 4,
light: str = "white", dark: str = "black",
quiet_zone: str = "white", data_dark: str = ""
) -> None:
# default 5x5 pixels in size
qr_code = segno.make_qr(data)
if data_dark:
qr_code.save(filename,
scale=scale,
border=border,
light=light,
dark=dark,
quiet_zone=quiet_zone,
data_dark=data_dark)
else:
qr_code.save(filename,
scale=scale,
border=border,
light=light,
dark=dark,
quiet_zone=quiet_zone)

def generate_GIF_qr_code(
gif_loc: str,
data: str = "Hello, World",
filename: str = "hello_world_qr.png",
scale: int = 1, border: int = 4,
light: str = "white", dark: str = "black",
quiet_zone: str = "white", data_dark: str = "",
) -> None:
"""
Takes in a segno QR code and generates a GIF version of it.
"""
qr_code = segno.make(data, error="h")
qr_code.to_artistic(background=gif_loc,
target=filename,
scale=scale,
border=border,
light=light,
dark=dark,
quiet_zone=quiet_zone)

if __name__ == "__main__":
script_dir = Path(__file__).parent
project_root = script_dir.parent
gif_path_1 = project_root / "IMGs" / "PyTexas_QR_Code_IMG_4.gif"
gif_path_0 = project_root / "IMGs" / "PyTexas_QR_Code_IMG_5.gif"

generate_qr_code_txt(scale=5, border=1, light="black", dark="hotpink",
data="https://pytexas.org/2026")

generate_GIF_qr_code(scale=10, border=1, light="black", filename="contest-1.gif",
data="https://canva.link/PyTexas2026-TalkGame",
gif_loc=str(gif_path_1))

generate_GIF_qr_code(scale=10, border=1, light="black", filename="deck-1.gif",
data="https://github.com/ProsperousHeart/mkdocs-jupyterlite-template-repo",
gif_loc=str(gif_path_0))

generate_GIF_qr_code(scale=10, border=0, light="black", filename="contest-0.gif",
data="https://canva.link/PyTexas2026-TalkGame",
gif_loc=str(gif_path_0))

generate_GIF_qr_code(scale=10, border=0, light="black", filename="deck-0.gif",
data="https://github.com/ProsperousHeart/mkdocs-jupyterlite-template-repo",
gif_loc=str(gif_path_0))

generate_GIF_qr_code(scale=10, border=1, light="black", filename="form-1.gif",
data="https://forms.gle/xMbzVjo4iPQGf1QT8",
gif_loc=str(gif_path_1))

generate_GIF_qr_code(scale=10, border=0, light="black", filename="form-0.gif",
data="https://forms.gle/xMbzVjo4iPQGf1QT8",
gif_loc=str(gif_path_0))

generate_GIF_qr_code(scale=10, border=0, light="black", filename="repo-site-0.gif",
data="https://resume.prosperousheart.com/mkdocs-jupyterlite-template-repo/",
gif_loc=str(gif_path_0))
65 changes: 64 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading