Skip to main content

Wayne Graphics: a Tkinter-based graphics engine with Wayne-AI code explainer and API router

Project description


Wayne Graphics

A lightweight Python graphics library built to speedrun AP CSP assignments and simplify event-driven programming.

Created by Wayne, a high school TA and PyPI developer from Martin County, Florida.


Installation

bash pip install wayne-graphics


Quick Start

`python from graphics.core import * from graphics.shapes import * from graphics.events import * from graphics.groups import *

Create a window app = WayneGraphics(width=600, height=400, title="Wayne Demo")

Draw shapes drawRect(app.canvas, 50, 50, 100, 60, color="blue") drawCircle(app.canvas, 300, 200, 40, color="red") drawText(app.canvas, 150, 300, "Hello Wayne!", font=("Courier", 16), color="green")

Handle mouse click def handle_click(x, y): print(f"Mouse clicked at ({x}, {y})")

onMousePress(app.canvas, handle_click)

Handle key press def handle_key(char): print(f"Key pressed: {char}")

onKeyPress(app.root, handle_key)

Run the app app.run() `


Modules

core.py WayneGraphics: Main window class with built-in canvas and event loop onMousePress(func): Binds left-click handler onKeyPress(func): Binds keypress handler run(): Starts the GUI loop

shapes.py drawRect(canvas, x, y, width, height, color) drawCircle(canvas, x, y, radius, color) drawText(canvas, x, y, text, font, color)

events.py Mouse Events: onMousePress, onMouseRelease, onMouseDrag, onMouseMove onMouseEnter, onMouseLeave, onRightClick, onMiddleClick, onScroll Keyboard Events: onKeyPress, onKeyRelease Animation: onStep(root, func, delay) Custom Binding: bind(canvasorroot, event, func)

groups.py group = app.createGroup(canvas, shape) group.move(x,y)


Why Wayne Graphics?

Minimal boilerplate — perfect for beginners and AP CSP students Fast setup — one-line install, instant canvas Event-driven — intuitive mouse and keyboard handling Modular design — clean separation of core, shapes, and events Classroom-tested — used in real AP CSP assignments


Educational Use

Wayne Graphics was built to help students focus on logic and creativity, not boilerplate. It’s ideal for: AP Computer Science Principles Python graphics projects Teaching event-driven programming Rapid prototyping


Contributing

Pull requests are welcome! If you’d like to add new shapes, events, or features, feel free to fork and submit.


License

MIT License — free to use, modify, and distribute.


Credits

Built by Wayne, a 17-year-old TA and PyPI developer from Martin County High School.
Inspired by the need to speedrun AP CSP assignments with style.


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

wayne_graphics-2.0.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wayne_graphics-2.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file wayne_graphics-2.0.0.tar.gz.

File metadata

  • Download URL: wayne_graphics-2.0.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for wayne_graphics-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ab22c5a17b5352dd392e97a56ef3d0fbd35f93e82eaf702672cbbc3556aa3944
MD5 8256fc2887bae3e1f0d977735d0afdc0
BLAKE2b-256 89f0061f6acbe982483f821fb9ada7929cb63098e5075ca5105aa15e8b1286b2

See more details on using hashes here.

File details

Details for the file wayne_graphics-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: wayne_graphics-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for wayne_graphics-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73ce3b5046e7d1eaf5379ca166740c48c48cab1b21e05ee16b46bd8dd8ca115e
MD5 9f1a96f8f75023877fdd4e0aa913d7de
BLAKE2b-256 9ef79477bf82f627bdad2a02c2e03f98f68d57779e082df6952e1e0e48435f1e

See more details on using hashes here.

Supported by

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