Skip to main content

pywebcanvas

pywebcanvas is a library that allows users to interact with the HTML Canvas with 100% Python + HTML.

Getting Started

Just add the following to an html file and you are ready to go!

Between the head tags, add pyscript and pywebcanvas:

<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />                                                         
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-env>
  - pywebcanvas
</py-env>

In the body, you can customize the following:

<py-script>
import pywebcanvas as pwc                                                                                                            

canvas = pwc.Canvas(800, 600)                                                                                                        
canvas.background.fill("blue")                                                                                                       
text = pwc.Text(text="Hello World from pywebcanvas!", x=100, y=100, size=25, color="yellow")                                         
canvas.render(text)
</py-script>

Documentation

Checkout the following to learn how to use this project:

Credits

This project is made possible by the developers of pyscript, pyodide, and many others. Licensed under LGPL-3.0-or-later Copyright (C) 2022 Isaac Beverly

Release files for pywebcanvas 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywebcanvas 0.3.0
File Size Uploaded
pywebcanvas-0.3.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pywebcanvas 0.3.0
File Interpreter ABI Platform
pywebcanvas-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / pywebcanvas-0.3.0.tar.gz

Download URL pywebcanvas-0.3.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
50a442b085481076909f6a0003e3e60dc4f75540bbb0a371ec225442f9cfb22b
BLAKE2b-256 checksum
How to use checksums
d6ba83931b8f24c35212eb4ed29bae7454c2da2d4f1e48ee9cbcc5285dd17acc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.13 Linux/5.17.5-1-default

Release files / pywebcanvas-0.3.0-py3-none-any.whl

Download URL pywebcanvas-0.3.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a09f449012424039cf972f5b29c0c01a95c2503256a0461c1c6c5a6c3f2e356
BLAKE2b-256 checksum
How to use checksums
f20cb229844fdde4efff021b09bbeba82d17935e462c54f5993eff8409835dc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.13 Linux/5.17.5-1-default

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page