pyglet

pyglet is a cross-platform windowing and multimedia library for Python, for developing games and other visually rich applications.

https://github.com/pyglet/pyglet

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 164 committers (2.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.9%) to scientific vocabulary

Keywords

gamedev opengl pyglet python scientific-visualization

Keywords from Contributors

closember arcade-learning-environment educational-resources educational-technology arcade-framework arcade-api game-developement pygame sdl2 sdl
Last synced: 6 months ago · JSON representation

Repository

pyglet is a cross-platform windowing and multimedia library for Python, for developing games and other visually rich applications.

Basic Info
  • Host: GitHub
  • Owner: pyglet
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage: http://pyglet.org
  • Size: 68.5 MB
Statistics
  • Stars: 2,075
  • Watchers: 29
  • Forks: 324
  • Open Issues: 106
  • Releases: 60
Topics
gamedev opengl pyglet python scientific-visualization
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

pypi rtd PyTest

logo_large.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.1). 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 The previous version of pyglet is tracked in the pyglet-2.0-maintenance branch. If you want to do a pull request for the previous release, please target the appropriate branch.

pyglet has an active developer and user community. If you find a bug or a problem with the documentation, please open an issue. 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 or PyInstaller.
  • 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.

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.
  • 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 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

To get started quickly:

pip install -r doc/requirements.txt
python 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 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 discord server, or subreddit.

For legal issues, please contact Alex Holkner.

Owner

  • Name: pyglet
  • Login: pyglet
  • Kind: organization

GitHub Events

Total
  • Create event: 22
  • Release event: 8
  • Issues event: 78
  • Watch event: 220
  • Issue comment event: 260
  • Push event: 170
  • Pull request review comment event: 41
  • Pull request review event: 78
  • Pull request event: 131
  • Fork event: 31
Last Year
  • Create event: 22
  • Release event: 8
  • Issues event: 78
  • Watch event: 220
  • Issue comment event: 260
  • Push event: 170
  • Pull request review comment event: 41
  • Pull request review event: 78
  • Pull request event: 131
  • Fork event: 31

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 6,004
  • Total Committers: 164
  • Avg Commits per committer: 36.61
  • Development Distribution Score (DDS): 0.693
Past Year
  • Commits: 275
  • Committers: 23
  • Avg Commits per committer: 11.957
  • Development Distribution Score (DDS): 0.451
Top Committers
Name Email Commits
Benjamin Moran b****n@p****m 1,845
Alex.Holkner A****r@g****m 1,727
r1chardj0n3s d****l@l****t 541
Rob van der Most s****7@g****m 450
caffeinepills v****e@g****m 191
Daniel Gillet d****7@g****m 155
Einar Forselv e****v@g****m 129
Juan J. Martínez j****m@u****t 120
Phillip Nguyen e****p@g****m 112
Paul 3****o 65
Andreas Schiefer a****r@g****m 59
Steve Johnson s****e@g****m 40
Richard Jones r****d@m****t 37
Square789 4****9 34
anatoly techtonik t****k@g****m 24
jerekshoe j****8@g****m 21
txema t****a@n****t 21
rob r****b@S****R 19
shenjack 3****8@q****m 16
Paul Craven p****l@c****m 13
Richard Thomas R****2@c****t 13
Winston W w****w@s****m 11
Bruce Smith o****s@g****m 10
jerekshoe j****r@e****u 10
Serdar Yegulalp t****e@g****m 10
cclauss c****s@m****m 9
Adam Bark a****0@g****m 9
txema t****a@A****l 9
Ross-TheBoss 6****s 8
Tony P. g****9@g****m 8
and 134 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 284
  • Total pull requests: 520
  • Average time to close issues: 6 months
  • Average time to close pull requests: 16 days
  • Total issue authors: 173
  • Total pull request authors: 60
  • Average comments per issue: 4.37
  • Average comments per pull request: 1.14
  • Merged pull requests: 429
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 59
  • Pull requests: 161
  • Average time to close issues: 8 days
  • Average time to close pull requests: 5 days
  • Issue authors: 49
  • Pull request authors: 24
  • Average comments per issue: 1.88
  • Average comments per pull request: 0.61
  • Merged pull requests: 128
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • pushfoo (28)
  • matanox (11)
  • shenjackyuanjie (9)
  • eruvanos (7)
  • cspotcode (6)
  • benmoran56 (6)
  • nbroderick-code (4)
  • MassPig (4)
  • Andrea-Oliveri (4)
  • matanster (4)
  • ccanepa (4)
  • kingadami (4)
  • happyleibniz (3)
  • zhengxyz123 (3)
  • gizmoore (3)
Pull Request Authors
  • caffeinepills (175)
  • pushfoo (58)
  • Square789 (44)
  • benmoran56 (28)
  • einarf (27)
  • shenjackyuanjie (20)
  • csd4ni3l (13)
  • jej (11)
  • zhengxyz123 (10)
  • cdeil (10)
  • gran4 (8)
  • kingadami (7)
  • eruvanos (7)
  • pythonengineer (6)
  • matanox (5)
Top Labels
Issue Labels
bug (146) enhancement (48) help wanted (9) mac (9) stale (7) reproducible (7) windows (6) not reproducible (4) linux (3) workaround (2) documentation (1) wontfix (1) support (1) typing (1)
Pull Request Labels
WIP (2) dependencies (2)

Packages

  • Total packages: 6
  • Total downloads:
    • pypi 775,111 last-month
  • Total docker downloads: 24,631,867
  • Total dependent packages: 144
    (may contain duplicates)
  • Total dependent repositories: 5,556
    (may contain duplicates)
  • Total versions: 259
  • Total maintainers: 6
pypi.org: pyglet

pyglet is a cross-platform games and multimedia package.

  • Versions: 141
  • Dependent Packages: 134
  • Dependent Repositories: 5,501
  • Downloads: 775,111 Last month
  • Docker Downloads: 24,631,867
Rankings
Dependent repos count: 0.1%
Dependent packages count: 0.2%
Downloads: 0.6%
Docker downloads count: 0.7%
Average: 1.1%
Stargazers count: 1.7%
Forks count: 3.1%
Last synced: 6 months ago
proxy.golang.org: github.com/pyglet/pyglet
  • Versions: 69
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.7%
Forks count: 1.7%
Average: 5.9%
Dependent packages count: 9.6%
Dependent repos count: 10.8%
Last synced: 6 months ago
alpine-edge: py3-pyglet

Cross-platform windowing and multimedia library for Python

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 7.5%
Dependent packages count: 14.9%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-pyglet-pyc

Precompiled Python bytecode for py3-pyglet

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 7.5%
Dependent packages count: 14.9%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: pyglet
  • Homepage: http://pyglet.org
  • License: BSD-3-Clause
  • Latest release: 1.5.27
    published over 3 years ago
  • Versions: 31
  • Dependent Packages: 8
  • Dependent Repositories: 55
Rankings
Dependent repos count: 4.8%
Dependent packages count: 7.1%
Average: 8.4%
Stargazers count: 10.6%
Forks count: 11.1%
Last synced: 6 months ago
spack.io: py-pyglet

pyglet is a cross-platform windowing and multimedia library for Python for developing games and other visually rich applications.

  • Versions: 4
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 14.0%
Dependent packages count: 28.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

doc/requirements.txt pypi
  • Sphinx *
  • pytest *
  • sphinx-rtd-theme *
tests/requirements.txt pypi
  • Pillow *
  • pytest *
  • pytest-cov *
tools/requirements.txt pypi
  • opengl-registry *
.github/workflows/codeql.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/unittests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • msys2/setup-msys2 v2 composite
setup.py pypi