Skip to main content

Graphics Library for Python

Project description

Processing Python

Processing Python is a powerful and easy-to-use Graphics Library for Python based on Processing.

It allows you to draw shapes in a window with simple functions like rect() or line(), design animations using the mouse position and much more.

Installation

Install the processing-py package using pip:

 pip install processing-py --upgrade

The first time you run some code using the library, a script will automatically download the appropriate Processing-py command line tools and Java Runtime Enviromment 8u202 for you system (~120 MB).

How to use

from processing_py import *

app = App(600,400) # create window: width, height
app.background(255,0,0) # set background:  red, green, blue
app.redraw() # refresh the window

#app.exit() # close the window

Drawing

from processing_py import *

app = App(600,400) # create window: width, height
app.background(0,0,0) # set background:  red, green, blue
app.fill(255,255,0) # set color for objects: red, green, blue
app.rect(100,100,200,100) # draw a rectangle: x0, y0, size_x, size_y
app.fill(0,0,255) # set color for objects: red, green, blue
app.ellipse(300,200,50,50) # draw a circle: center_x, center_y, size_x, size_y
app.redraw() # refresh the window

Result:

Mouse & Animation

from processing_py import *
app = App(600,400) # create window: width, height

while(True):
   app.background(0,0,0) # set background:  red, green, blue
   app.fill(255,255,0) # set color for objects: red, green, blue
   app.ellipse(app.mouseX,app.mouseY,50,50) # draw a circle: center_x, center_y, size_x, size_y
   app.redraw() # refresh the window

Result:

More functions

Explore all the possibilities in the Processing Reference.

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

processing_py-0.3.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

processing_py-0.3.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file processing_py-0.3.3.tar.gz.

File metadata

  • Download URL: processing_py-0.3.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for processing_py-0.3.3.tar.gz
Algorithm Hash digest
SHA256 4fe695bea27f9d7a21b8df9f476e15d0d8e1e2ed19f5a3eb7b713f96c7f7f398
MD5 6e101c0a96cad540068f5ec48394ff46
BLAKE2b-256 abbe3d3aa88f99ba2f45f7c08b0b0d6dcf2406686cb3a89f33391bc3033be146

See more details on using hashes here.

File details

Details for the file processing_py-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: processing_py-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for processing_py-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 364197444993c21f4c529ca824265ca1bd8475834198fba2205fbd7a940d4894
MD5 8ef7d86ae4620fe91da599071f2bbb50
BLAKE2b-256 f6d2669833df83cd3a7d8b9412e03797428a49d7b2287daff91e6ce2985caeca

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