pyglet


Namepyglet JSON
Version 2.0.20 PyPI version JSON
download
home_pageNone
Summarypyglet is a cross-platform games and multimedia package.
upload_time2024-12-06 09:04:38
maintainerNone
docs_urlhttps://pythonhosted.org/pyglet/
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![pypi](https://badge.fury.io/py/pyglet.svg)](https://pypi.python.org/pypi/pyglet) [![rtd](https://readthedocs.org/projects/pyglet/badge/?version=latest)](https://pyglet.readthedocs.io) [![PyTest](https://github.com/pyglet/pyglet/actions/workflows/unittests.yml/badge.svg)](https://github.com/pyglet/pyglet/actions/workflows/unittests.yml)

![logo_large.png](https://github.com/pyglet/pyglet/blob/54a8c8b7e701b1692c6a10dd80f94ec837c27bd3/examples/opengl/pyglet.png)

# pyglet

*pyglet* is a cross-platform windowing and multimedia library for Python, intended for developing games
and other visually rich applications. It supports Windowing, input event handling, Controllers & Joysticks,
OpenGL graphics, loading images and videos, and playing sounds and music. *pyglet* works on Windows, OS X and Linux.

> :exclamation: :exclamation: A major pyglet update has just been released (v2.0). This brings many 
> new exciting features, but also some necessary breaking changes. If your game/application has suddenly 
> stopped working, please read the [migration section in the documentation](https://pyglet.readthedocs.io/en/latest/programming_guide/migration.html)
> The previous version of pyglet is tracked in the `pyglet-1.5-maintenance` branch.
> **If you want to do a pull request for the previous release, please target the appropriate branch**. 

> :exclamation: `pyglet.graphics.draw` and `pyglet.graphics.draw_indexed` will be removed
> in pyglet v2.1. The `shapes` module is an alternative for drawing simple shapes. 

* pyglet [documentation]
* pyglet on [PyPI]
* pyglet [discord] server
* pyglet [mailing list]
* pyglet [issue tracker]
* pyglet [website]

pyglet has an active developer and user community.  If you find a bug or a problem with the documentation,
please [open an issue](https://github.com/pyglet/pyglet/issues).
Anyone is welcome to join our [discord] server where a lot of the development discussion is going on.
It's also a great place to ask for help.

Some features of pyglet are:

* **No external dependencies or installation requirements.** For most application and game requirements, *pyglet*
  needs nothing else besides Python, simplifying distribution and installation. It's easy to package and distribute
  your project with [Nuitka](https://nuitka.net) or [PyInstaller](https://pyinstaller.org). 
* **Take advantage of multiple windows and multi-monitor desktops.** *pyglet* allows you to use multiple
  platform-native windows, and is fully aware of multi-monitor setups for use with fullscreen games.
* **Load images, sound, music and video in almost any format.** *pyglet* can optionally use FFmpeg to play back
  audio formats such as MP3, OGG/Vorbis and WMA, and video formats such as MPEG2, H.264, H.265, WMV and Xvid.
  Without FFmpeg, *pyglet* contains built-in support for standard formats such as wav, png, bmp, and others.
* **pyglet is written entirely in pure Python**, and makes use of the *ctypes* module to interface with system
  libraries. You can modify the codebase or make a contribution without any second language compilation steps or
  compiler setup. Despite being pure Python, *pyglet* has excellent performance thanks to advanced batching for
  drawing thousands of objects.
* **pyglet is provided under the BSD open-source license**, allowing you to use it for both commercial and other
  open-source projects with very little restriction.

## Requirements

pyglet runs under Python 3.8+. Being written in pure Python, it also works on other Python interpreters such as PyPy. Supported platforms are:

* Windows 7 or later
* Mac OS X 10.3 or later
* Linux, with the following libraries (most recent distributions will have
  these in a default installation):
  * OpenGL and GLX
  * GDK 2.0+ or Pillow (required for loading images other than PNG and BMP)
  * OpenAL or Pulseaudio (required for playing audio)

**As of pyglet 2.0, OpenGL 3.3+ is required**. 

To play a large variety of compressed audio and video files,
pyglet can optionally take advantage of [FFmpeg](https://ffmpeg.org/).

## Installation

pyglet is installable from PyPI:

    pip install --upgrade --user pyglet

## Installation from source

If you're reading this `README` from a source distribution, you can install pyglet with:

    pip install --upgrade --user .
    # or
    python setup.py install --user

You can also install the latest development version directly from Github:

    pip install --upgrade --user https://github.com/pyglet/pyglet/archive/master.zip

For local development install pyglet in editable mode:

```bash
# with pip
pip install -e .
# with setup.py
python setup.py develop
```

There are no compilation steps during the installation; if you prefer,
you can simply add this directory to your `PYTHONPATH` and use pyglet without
installing it. You can also copy pyglet directly into your project folder.

## Contributing

**A good way to start contributing to a component of pyglet is by its documentation**. When studying the code you
are going to work with, also read the associated docs. If you don't understand the code with the help of the docs,
it is a sign that the docs should be improved. If you wish to make large changes to any part of pyglet, it's always
a good idea to reach out for feedback first. This can avoid wasted effort in cases where someone is already working
on something similar, or if your idea can't be accepted for any reason. 

A basic outline of how to a contribution is as follows:

* Fork the [official repository](https://github.com/pyglet/pyglet/fork).
* In your fork, checkout the branch you wish to contribute to (such as *pyglet-1.5-maintenance*).
* Apply your changes to your fork.
* Submit a [pull request](https://github.com/pyglet/pyglet/pulls) describing the changes you have made.
* Alternatively you can create a patch and submit it to the issue tracker.

When making a pull request, check that you have addressed its respective documentation, both within the code docstrings
and the programming guide (if applicable). It is very important to all of us that the documentation matches the latest
code and vice-versa.

Consequently, an error in the documentation, either because it is hard to understand or because it doesn't match the
code, is a bug that deserves to be reported on a ticket.

## Building Docs

[Documentation and Type Hints]: https://pyglet.readthedocs.io/en/latest/internal/doc.html

To get started quickly:

    pip install -r doc/requirements.txt
    ./make.py docs

Please check [Documentation and Type Hints][] guide to learn more.

## Testing

pyglet makes use of pytest for its test suite.

```bash
pip install -r tests/requirements.txt --user
# Only run unittests
pytest tests/unit
```

Please check the [testing section in the development guide](https://pyglet.readthedocs.io/en/latest/internal/testing.html)
for more information about running and writing tests.

## Contact

pyglet is developed by many individual volunteers, and there is no central point of contact. If you have a question
about developing with pyglet, or you wish to contribute, please join the [mailing list], [discord] server, or [subreddit].

For legal issues, please contact [Alex Holkner](mailto:Alex.Holkner@gmail.com).

[discord]: https://discord.gg/QXyegWe
[mailing list]: http://groups.google.com/group/pyglet-users
[subreddit]: https://www.reddit.com/r/pyglet/
[documentation]: https://pyglet.readthedocs.io
[wiki]:  https://github.com/pyglet/pyglet/wiki
[pypi]:  https://pypi.org/project/pyglet/
[website]: http://pyglet.org/
[issue tracker]: https://github.com/pyglet/pyglet/issues


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyglet",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/pyglet/",
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Alex Holkner & contributors <Alex.Holkner@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f7/f4/9ff17629bbb818d6fd88f1d74ef117d4eba3bee8a54c14265f86a6c18f86/pyglet-2.0.20.tar.gz",
    "platform": null,
    "description": "[![pypi](https://badge.fury.io/py/pyglet.svg)](https://pypi.python.org/pypi/pyglet) [![rtd](https://readthedocs.org/projects/pyglet/badge/?version=latest)](https://pyglet.readthedocs.io) [![PyTest](https://github.com/pyglet/pyglet/actions/workflows/unittests.yml/badge.svg)](https://github.com/pyglet/pyglet/actions/workflows/unittests.yml)\n\n![logo_large.png](https://github.com/pyglet/pyglet/blob/54a8c8b7e701b1692c6a10dd80f94ec837c27bd3/examples/opengl/pyglet.png)\n\n# pyglet\n\n*pyglet* is a cross-platform windowing and multimedia library for Python, intended for developing games\nand other visually rich applications. It supports Windowing, input event handling, Controllers & Joysticks,\nOpenGL graphics, loading images and videos, and playing sounds and music. *pyglet* works on Windows, OS X and Linux.\n\n> :exclamation: :exclamation: A major pyglet update has just been released (v2.0). This brings many \n> new exciting features, but also some necessary breaking changes. If your game/application has suddenly \n> stopped working, please read the [migration section in the documentation](https://pyglet.readthedocs.io/en/latest/programming_guide/migration.html)\n> The previous version of pyglet is tracked in the `pyglet-1.5-maintenance` branch.\n> **If you want to do a pull request for the previous release, please target the appropriate branch**. \n\n> :exclamation: `pyglet.graphics.draw` and `pyglet.graphics.draw_indexed` will be removed\n> in pyglet v2.1. The `shapes` module is an alternative for drawing simple shapes. \n\n* pyglet [documentation]\n* pyglet on [PyPI]\n* pyglet [discord] server\n* pyglet [mailing list]\n* pyglet [issue tracker]\n* pyglet [website]\n\npyglet has an active developer and user community.  If you find a bug or a problem with the documentation,\nplease [open an issue](https://github.com/pyglet/pyglet/issues).\nAnyone is welcome to join our [discord] server where a lot of the development discussion is going on.\nIt's also a great place to ask for help.\n\nSome features of pyglet are:\n\n* **No external dependencies or installation requirements.** For most application and game requirements, *pyglet*\n  needs nothing else besides Python, simplifying distribution and installation. It's easy to package and distribute\n  your project with [Nuitka](https://nuitka.net) or [PyInstaller](https://pyinstaller.org). \n* **Take advantage of multiple windows and multi-monitor desktops.** *pyglet* allows you to use multiple\n  platform-native windows, and is fully aware of multi-monitor setups for use with fullscreen games.\n* **Load images, sound, music and video in almost any format.** *pyglet* can optionally use FFmpeg to play back\n  audio formats such as MP3, OGG/Vorbis and WMA, and video formats such as MPEG2, H.264, H.265, WMV and Xvid.\n  Without FFmpeg, *pyglet* contains built-in support for standard formats such as wav, png, bmp, and others.\n* **pyglet is written entirely in pure Python**, and makes use of the *ctypes* module to interface with system\n  libraries. You can modify the codebase or make a contribution without any second language compilation steps or\n  compiler setup. Despite being pure Python, *pyglet* has excellent performance thanks to advanced batching for\n  drawing thousands of objects.\n* **pyglet is provided under the BSD open-source license**, allowing you to use it for both commercial and other\n  open-source projects with very little restriction.\n\n## Requirements\n\npyglet runs under Python 3.8+. Being written in pure Python, it also works on other Python interpreters such as PyPy. Supported platforms are:\n\n* Windows 7 or later\n* Mac OS X 10.3 or later\n* Linux, with the following libraries (most recent distributions will have\n  these in a default installation):\n  * OpenGL and GLX\n  * GDK 2.0+ or Pillow (required for loading images other than PNG and BMP)\n  * OpenAL or Pulseaudio (required for playing audio)\n\n**As of pyglet 2.0, OpenGL 3.3+ is required**. \n\nTo play a large variety of compressed audio and video files,\npyglet can optionally take advantage of [FFmpeg](https://ffmpeg.org/).\n\n## Installation\n\npyglet is installable from PyPI:\n\n    pip install --upgrade --user pyglet\n\n## Installation from source\n\nIf you're reading this `README` from a source distribution, you can install pyglet with:\n\n    pip install --upgrade --user .\n    # or\n    python setup.py install --user\n\nYou can also install the latest development version directly from Github:\n\n    pip install --upgrade --user https://github.com/pyglet/pyglet/archive/master.zip\n\nFor local development install pyglet in editable mode:\n\n```bash\n# with pip\npip install -e .\n# with setup.py\npython setup.py develop\n```\n\nThere are no compilation steps during the installation; if you prefer,\nyou can simply add this directory to your `PYTHONPATH` and use pyglet without\ninstalling it. You can also copy pyglet directly into your project folder.\n\n## Contributing\n\n**A good way to start contributing to a component of pyglet is by its documentation**. When studying the code you\nare going to work with, also read the associated docs. If you don't understand the code with the help of the docs,\nit is a sign that the docs should be improved. If you wish to make large changes to any part of pyglet, it's always\na good idea to reach out for feedback first. This can avoid wasted effort in cases where someone is already working\non something similar, or if your idea can't be accepted for any reason. \n\nA basic outline of how to a contribution is as follows:\n\n* Fork the [official repository](https://github.com/pyglet/pyglet/fork).\n* In your fork, checkout the branch you wish to contribute to (such as *pyglet-1.5-maintenance*).\n* Apply your changes to your fork.\n* Submit a [pull request](https://github.com/pyglet/pyglet/pulls) describing the changes you have made.\n* Alternatively you can create a patch and submit it to the issue tracker.\n\nWhen making a pull request, check that you have addressed its respective documentation, both within the code docstrings\nand the programming guide (if applicable). It is very important to all of us that the documentation matches the latest\ncode and vice-versa.\n\nConsequently, an error in the documentation, either because it is hard to understand or because it doesn't match the\ncode, is a bug that deserves to be reported on a ticket.\n\n## Building Docs\n\n[Documentation and Type Hints]: https://pyglet.readthedocs.io/en/latest/internal/doc.html\n\nTo get started quickly:\n\n    pip install -r doc/requirements.txt\n    ./make.py docs\n\nPlease check [Documentation and Type Hints][] guide to learn more.\n\n## Testing\n\npyglet makes use of pytest for its test suite.\n\n```bash\npip install -r tests/requirements.txt --user\n# Only run unittests\npytest tests/unit\n```\n\nPlease check the [testing section in the development guide](https://pyglet.readthedocs.io/en/latest/internal/testing.html)\nfor more information about running and writing tests.\n\n## Contact\n\npyglet is developed by many individual volunteers, and there is no central point of contact. If you have a question\nabout developing with pyglet, or you wish to contribute, please join the [mailing list], [discord] server, or [subreddit].\n\nFor legal issues, please contact [Alex Holkner](mailto:Alex.Holkner@gmail.com).\n\n[discord]: https://discord.gg/QXyegWe\n[mailing list]: http://groups.google.com/group/pyglet-users\n[subreddit]: https://www.reddit.com/r/pyglet/\n[documentation]: https://pyglet.readthedocs.io\n[wiki]:  https://github.com/pyglet/pyglet/wiki\n[pypi]:  https://pypi.org/project/pyglet/\n[website]: http://pyglet.org/\n[issue tracker]: https://github.com/pyglet/pyglet/issues\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "pyglet is a cross-platform games and multimedia package.",
    "version": "2.0.20",
    "project_urls": {
        "Home": "https://pyglet.org"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3216583a53b9910ece5fd6db9590ae88dc24fd0d5ef76f7c6717b8761388fb8",
                "md5": "f80ebd7a627a9beb0b1bee1677826556",
                "sha256": "341cdc506fe97c4d8c4fb35aac89cefcb0ca6bf59eddcf2d1078c327dde1f02e"
            },
            "downloads": -1,
            "filename": "pyglet-2.0.20-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f80ebd7a627a9beb0b1bee1677826556",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 945058,
            "upload_time": "2024-12-06T09:04:32",
            "upload_time_iso_8601": "2024-12-06T09:04:32.480714Z",
            "url": "https://files.pythonhosted.org/packages/d3/21/6583a53b9910ece5fd6db9590ae88dc24fd0d5ef76f7c6717b8761388fb8/pyglet-2.0.20-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7f49ff17629bbb818d6fd88f1d74ef117d4eba3bee8a54c14265f86a6c18f86",
                "md5": "31ebff2e601c325df687958d2716ff3d",
                "sha256": "702ea52b1fc1b6447904d2edd579212b29f1b3475e098ac49b57647a064accb7"
            },
            "downloads": -1,
            "filename": "pyglet-2.0.20.tar.gz",
            "has_sig": false,
            "md5_digest": "31ebff2e601c325df687958d2716ff3d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6488999,
            "upload_time": "2024-12-06T09:04:38",
            "upload_time_iso_8601": "2024-12-06T09:04:38.157735Z",
            "url": "https://files.pythonhosted.org/packages/f7/f4/9ff17629bbb818d6fd88f1d74ef117d4eba3bee8a54c14265f86a6c18f86/pyglet-2.0.20.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-06 09:04:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyglet"
}
        
Elapsed time: 1.35689s