p5
===
p5 is a Python library that provides high level drawing functionality
to help you quickly create simulations and interactive art using
Python. It combines the core ideas of `Processing
<https://processing.org/>`_ — learning to code in a visual context —
with Python's readability to make programming more accessible to
beginners, educators, and artists.
Example
-------
.. image:: https://github.com/p5py/p5/blob/develop/docs/_static/readme.gif
p5 programs are called "sketches" and are run as any other Python
program. The sketch above, for instance, draws a circle at the mouse
location that gets a random reddish color when the mouse is pressed
and is white otherwise; the size of the circle is chosen randomly. The
Python code for the sketch looks like:
.. code:: python
from p5 import *
def setup():
size(640, 360)
no_stroke()
background(204)
def draw():
if mouse_is_pressed:
fill(random_uniform(255), random_uniform(127), random_uniform(51), 127)
else:
fill(255, 15)
circle_size = random_uniform(low=10, high=80)
circle((mouse_x, mouse_y), circle_size)
def key_pressed(event):
background(204)
run()
Documentation
------------
The p5py documentation can be found here `p5 documentation
<http://p5.readthedocs.io>`_
Installation
------------
Take a look at the installation steps here in the `p5 documentation
<http://p5.readthedocs.io/en/latest/install.html>`_
License
-------
p5 is licensed under the GPLv3. See `LICENSE <LICENSE>`_ for more
details. p5 also includes the following components from other open
source projects:
- OpenGL shaders `from the Processing
<https://github.com/processing/processing/tree/master/core/src/processing/opengl/shaders>`_
project. Licensed under LGPL v2.1. See `LICENSES/lgpl-2.1.txt
<LICENSES/lgpl-2.1.txt>`_ for the full license text.
All licenses for these external components are available in the
``LICENSES`` folder.
===
p5 is a Python library that provides high level drawing functionality
to help you quickly create simulations and interactive art using
Python. It combines the core ideas of `Processing
<https://processing.org/>`_ — learning to code in a visual context —
with Python's readability to make programming more accessible to
beginners, educators, and artists.
Example
-------
.. image:: https://github.com/p5py/p5/blob/develop/docs/_static/readme.gif
p5 programs are called "sketches" and are run as any other Python
program. The sketch above, for instance, draws a circle at the mouse
location that gets a random reddish color when the mouse is pressed
and is white otherwise; the size of the circle is chosen randomly. The
Python code for the sketch looks like:
.. code:: python
from p5 import *
def setup():
size(640, 360)
no_stroke()
background(204)
def draw():
if mouse_is_pressed:
fill(random_uniform(255), random_uniform(127), random_uniform(51), 127)
else:
fill(255, 15)
circle_size = random_uniform(low=10, high=80)
circle((mouse_x, mouse_y), circle_size)
def key_pressed(event):
background(204)
run()
Documentation
------------
The p5py documentation can be found here `p5 documentation
<http://p5.readthedocs.io>`_
Installation
------------
Take a look at the installation steps here in the `p5 documentation
<http://p5.readthedocs.io/en/latest/install.html>`_
License
-------
p5 is licensed under the GPLv3. See `LICENSE <LICENSE>`_ for more
details. p5 also includes the following components from other open
source projects:
- OpenGL shaders `from the Processing
<https://github.com/processing/processing/tree/master/core/src/processing/opengl/shaders>`_
project. Licensed under LGPL v2.1. See `LICENSES/lgpl-2.1.txt
<LICENSES/lgpl-2.1.txt>`_ for the full license text.
All licenses for these external components are available in the
``LICENSES`` folder.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
p5-0.5.0.tar.gz
(39.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
p5-0.5.0-py3-none-any.whl
(55.8 kB
view details)
File details
Details for the file p5-0.5.0.tar.gz.
File metadata
- Download URL: p5-0.5.0.tar.gz
- Upload date:
- Size: 39.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c04dc834ab1c85ec35829e1ceaf645dde63c1fd4975d3b3dbcaa07c6a8f072e
|
|
| MD5 |
a29512775cccde0709ac69be36360c30
|
|
| BLAKE2b-256 |
d905798c94bee5a143b3cabc4cc90c7c1d714f51cb369bbee89475d3a6129139
|
File details
Details for the file p5-0.5.0-py3-none-any.whl.
File metadata
- Download URL: p5-0.5.0-py3-none-any.whl
- Upload date:
- Size: 55.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a47042c6310bd28417956f1f48fa43a67e020c08ba0afd299b6ae7458a47363
|
|
| MD5 |
eac55ff0d567f2e9f7e9794bbec9f080
|
|
| BLAKE2b-256 |
4dc78511231f2d8eb67447ab82cccd9bd572ea0fe1ccef8b95a51116bd712458
|