py5


Namepy5 JSON
Version 0.10.1a1 PyPI version JSON
download
home_pageNone
SummaryProcessing for CPython
upload_time2024-03-30 18:33:48
maintainerNone
docs_urlNone
authorNone
requires_python>3.8
licenseNone
keywords ipython jupyter processing widgets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py5

[![py5 montly downloads](https://pepy.tech/badge/py5/month)](https://pepy.tech/project/py5)

[![py5 weekly downloads](https://pepy.tech/badge/py5/week)](https://pepy.tech/project/py5)

[![mybinder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/py5coding/py5examples/HEAD?urlpath=lab)

py5 is a new version of [Processing][processing] for Python 3.8+. The goal of py5 is to create a version of Processing that is [integrated into the Python ecosystem](https://py5coding.org/integrations/python_ecosystem_integrations.html). Built into the library are thoughtful choices about how to best get py5 to work with other popular Python libraries and tools such as [Jupyter](https://jupyter.org/), [numpy](https://numpy.org/), [shapely](https://shapely.readthedocs.io/en/stable/), [trimesh](https://trimesh.org/), [matplotlib](https://matplotlib.org/), and [Pillow](https://python-pillow.org/).

py5 is an excellent choice for educators looking to teach Python in the context of creative coding and is currently used in classrooms all around the world. The documentation website includes [introductory tutorials](https://py5coding.org/tutorials/intro_to_py5_and_python.html) as well as extensive [reference documentation](https://py5coding.org/reference/summary.html), complete with example code.

## Basic Example

Here is a basic example of a working py5 Sketch:

```python3
import py5


def setup():
    py5.size(400, 400)
    py5.rect_mode(py5.CENTER)


def draw():
    py5.square(py5.mouse_x, py5.mouse_y, 10)


def mouse_clicked():
    py5.fill(py5.random_int(255), py5.random_int(255), py5.random_int(255))


py5.run_sketch()
```

## Installation

If you have Java 17 installed on your computer, you can install py5 using pip:

```bash
pip install py5
```

[Detailed installation instructions](https://py5coding.org/content/install.html) are available on the documentation website. There are some [Special Notes for Mac Users](https://py5coding.org/content/macos_users.html) that you should read if you use macOS.

## Getting Started

If you are new to Python, start with the [intro to py5 and python](https://py5coding.org/tutorials/intro_to_py5_and_python.html) tutorials. If you are familiar with Java programming and Processing, you'll find the [Tips for Processing Java Users](https://py5coding.org/content/coming_from_processing_java.html) page to be helpful.

There are currently five basic ways to use py5. They are:

* **module mode**: create a sketch with `setup()` and `draw()` functions that call methods provided by the `py5` library. The above example is created in module mode.
* **class mode**: create a Python class inherited from `py5.Sketch`. This mode supports multiple Sketches running at the same time.
* **imported mode**: simplified code that omits the `py5.` prefix. This mode is supported by the py5 Jupyter notebook kernel and the `run_sketch` command line utility.
* **static mode**: functionless code to create static images. This mode is supported by the py5bot Jupyter notebook kernel, the `%%py5bot` IPython magic, and the `run_sketch` command line utility.
* **processing mode**: make calls to Python from a Processing (Java) Sketch. This mode enables py5 to function as bridge, connecting the Python and Java ecosystems through a new `callPython()` method.

## Source Code

py5 was created by the artist and software developer [Jim Schmitz](https://ixora.io/) ([@hx2A](https://github.com/hx2A)) starting in March of 2020. The library is the foundation of his [art practice](https://ixora.io/art/).

The py5 library makes the Java Processing jars available to the CPython interpreter using [JPype][jpype]. It can do just about everything Processing can do, except with Python instead of Java code. New py5 features and bug fixes are being added to py5 every day. The library is always in active development and is well maintained.

To view the actual installed py5 library code, look at the [py5 repository][py5_repo]. The py5 library code is the output of the meta-programming project [py5generator][py5generator_repo]. All py5 development is done through [py5generator][py5generator_repo].

## Funding

[Please sponsor py5!](https://github.com/sponsors/py5coding)

This project is not an official part of the Processing Foundation and is not receiving any funding from them. Any funds you contribute will be used first for website expenses and next to support [@hx2A](https://github.com/hx2A/)'s time to further develop py5 as a solid creative coding framework used by educators, artists, and hobbyists all around the world.

## Get In Touch

Have a comment or question? We'd love to hear from you! The best ways to reach out are:

* github [discussions](https://github.com/py5coding/py5generator/discussions) and [issues](https://github.com/py5coding/py5generator/issues)
* Mastodon <a rel="me" href="https://fosstodon.org/@py5coding">fosstodon.org/@py5coding</a>
* twitter [@py5coding](https://twitter.com/py5coding)
* [processing foundation discourse](https://discourse.processing.org/c/28)

[processing]: https://github.com/processing/processing4
[jpype]: https://github.com/jpype-project/jpype
[py5_repo]: https://github.com/py5coding/py5
[py5generator_repo]: https://github.com/py5coding/py5generator

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py5",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">3.8",
    "maintainer_email": null,
    "keywords": "IPython, Jupyter, Processing, Widgets",
    "author": null,
    "author_email": "Jim Schmitz <jim@ixora.io>",
    "download_url": "https://files.pythonhosted.org/packages/ad/3a/c923c27aa7dbb494963b7c5e469dd82e82d5932f7a86df43d130a544d8dd/py5-0.10.1a1.tar.gz",
    "platform": null,
    "description": "# py5\n\n[![py5 montly downloads](https://pepy.tech/badge/py5/month)](https://pepy.tech/project/py5)\n\n[![py5 weekly downloads](https://pepy.tech/badge/py5/week)](https://pepy.tech/project/py5)\n\n[![mybinder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/py5coding/py5examples/HEAD?urlpath=lab)\n\npy5 is a new version of [Processing][processing] for Python 3.8+. The goal of py5 is to create a version of Processing that is [integrated into the Python ecosystem](https://py5coding.org/integrations/python_ecosystem_integrations.html). Built into the library are thoughtful choices about how to best get py5 to work with other popular Python libraries and tools such as [Jupyter](https://jupyter.org/), [numpy](https://numpy.org/), [shapely](https://shapely.readthedocs.io/en/stable/), [trimesh](https://trimesh.org/), [matplotlib](https://matplotlib.org/), and [Pillow](https://python-pillow.org/).\n\npy5 is an excellent choice for educators looking to teach Python in the context of creative coding and is currently used in classrooms all around the world. The documentation website includes [introductory tutorials](https://py5coding.org/tutorials/intro_to_py5_and_python.html) as well as extensive [reference documentation](https://py5coding.org/reference/summary.html), complete with example code.\n\n## Basic Example\n\nHere is a basic example of a working py5 Sketch:\n\n```python3\nimport py5\n\n\ndef setup():\n    py5.size(400, 400)\n    py5.rect_mode(py5.CENTER)\n\n\ndef draw():\n    py5.square(py5.mouse_x, py5.mouse_y, 10)\n\n\ndef mouse_clicked():\n    py5.fill(py5.random_int(255), py5.random_int(255), py5.random_int(255))\n\n\npy5.run_sketch()\n```\n\n## Installation\n\nIf you have Java 17 installed on your computer, you can install py5 using pip:\n\n```bash\npip install py5\n```\n\n[Detailed installation instructions](https://py5coding.org/content/install.html) are available on the documentation website. There are some [Special Notes for Mac Users](https://py5coding.org/content/macos_users.html) that you should read if you use macOS.\n\n## Getting Started\n\nIf you are new to Python, start with the [intro to py5 and python](https://py5coding.org/tutorials/intro_to_py5_and_python.html) tutorials. If you are familiar with Java programming and Processing, you'll find the [Tips for Processing Java Users](https://py5coding.org/content/coming_from_processing_java.html) page to be helpful.\n\nThere are currently five basic ways to use py5. They are:\n\n* **module mode**: create a sketch with `setup()` and `draw()` functions that call methods provided by the `py5` library. The above example is created in module mode.\n* **class mode**: create a Python class inherited from `py5.Sketch`. This mode supports multiple Sketches running at the same time.\n* **imported mode**: simplified code that omits the `py5.` prefix. This mode is supported by the py5 Jupyter notebook kernel and the `run_sketch` command line utility.\n* **static mode**: functionless code to create static images. This mode is supported by the py5bot Jupyter notebook kernel, the `%%py5bot` IPython magic, and the `run_sketch` command line utility.\n* **processing mode**: make calls to Python from a Processing (Java) Sketch. This mode enables py5 to function as bridge, connecting the Python and Java ecosystems through a new `callPython()` method.\n\n## Source Code\n\npy5 was created by the artist and software developer [Jim Schmitz](https://ixora.io/) ([@hx2A](https://github.com/hx2A)) starting in March of 2020. The library is the foundation of his [art practice](https://ixora.io/art/).\n\nThe py5 library makes the Java Processing jars available to the CPython interpreter using [JPype][jpype]. It can do just about everything Processing can do, except with Python instead of Java code. New py5 features and bug fixes are being added to py5 every day. The library is always in active development and is well maintained.\n\nTo view the actual installed py5 library code, look at the [py5 repository][py5_repo]. The py5 library code is the output of the meta-programming project [py5generator][py5generator_repo]. All py5 development is done through [py5generator][py5generator_repo].\n\n## Funding\n\n[Please sponsor py5!](https://github.com/sponsors/py5coding)\n\nThis project is not an official part of the Processing Foundation and is not receiving any funding from them. Any funds you contribute will be used first for website expenses and next to support [@hx2A](https://github.com/hx2A/)'s time to further develop py5 as a solid creative coding framework used by educators, artists, and hobbyists all around the world.\n\n## Get In Touch\n\nHave a comment or question? We'd love to hear from you! The best ways to reach out are:\n\n* github [discussions](https://github.com/py5coding/py5generator/discussions) and [issues](https://github.com/py5coding/py5generator/issues)\n* Mastodon <a rel=\"me\" href=\"https://fosstodon.org/@py5coding\">fosstodon.org/@py5coding</a>\n* twitter [@py5coding](https://twitter.com/py5coding)\n* [processing foundation discourse](https://discourse.processing.org/c/28)\n\n[processing]: https://github.com/processing/processing4\n[jpype]: https://github.com/jpype-project/jpype\n[py5_repo]: https://github.com/py5coding/py5\n[py5generator_repo]: https://github.com/py5coding/py5generator\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Processing for CPython",
    "version": "0.10.1a1",
    "project_urls": {
        "Bug Tracker": "https://github.com/py5coding/py5generator/issues",
        "Documentation": "https://py5coding.org/",
        "Download": "https://pypi.org/project/py5",
        "Homepage": "https://py5coding.org/",
        "Source Code": "https://github.com/py5coding/py5"
    },
    "split_keywords": [
        "ipython",
        " jupyter",
        " processing",
        " widgets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c70a6217489bbdec39581d3d1f640c6afc4ab31c6dd6400db84acefccf211deb",
                "md5": "e3292adad0af484ec3335874220ce15c",
                "sha256": "76951f214be0678231e8db00976f64c9af9fbbe535e9e45f42b9ed7c2823e884"
            },
            "downloads": -1,
            "filename": "py5-0.10.1a1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3292adad0af484ec3335874220ce15c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.8",
            "size": 11525857,
            "upload_time": "2024-03-30T18:33:44",
            "upload_time_iso_8601": "2024-03-30T18:33:44.403905Z",
            "url": "https://files.pythonhosted.org/packages/c7/0a/6217489bbdec39581d3d1f640c6afc4ab31c6dd6400db84acefccf211deb/py5-0.10.1a1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad3ac923c27aa7dbb494963b7c5e469dd82e82d5932f7a86df43d130a544d8dd",
                "md5": "c4fb303431a12226558ecb898780161c",
                "sha256": "fedcdab2172f8b3ec4c461faf749063e142f576c18e1fc8feabad10f5d4a717f"
            },
            "downloads": -1,
            "filename": "py5-0.10.1a1.tar.gz",
            "has_sig": false,
            "md5_digest": "c4fb303431a12226558ecb898780161c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.8",
            "size": 11439195,
            "upload_time": "2024-03-30T18:33:48",
            "upload_time_iso_8601": "2024-03-30T18:33:48.165406Z",
            "url": "https://files.pythonhosted.org/packages/ad/3a/c923c27aa7dbb494963b7c5e469dd82e82d5932f7a86df43d130a544d8dd/py5-0.10.1a1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-30 18:33:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "py5coding",
    "github_project": "py5generator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "py5"
}
        
Elapsed time: 0.22205s