pyglet Documentation

pyglet is a cross-platform windowing and multimedia library for Python intended for game development. It supports windowing, user interface event handling, OpenGL graphics, loading images and videos, and playing sounds and music. It works on Windows, OS X and Linux.

Some of the 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.
  • Take advantage of multiple windows and multi-monitor desktops. pyglet allows you to use as many windows as you need, 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 AVbin to play back audio formats such as MP3, OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264, WMV and Xvid.
  • 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.
  • Supports Python 2 and 3. Pick your favorite!

Please join us on the mailing list!

Programming Guide

The pyglet Programming Guide provides in-depth documentation for writing applications that use pyglet. Many topics described here reference the pyglet API reference, provided separately.

If this is your first time reading about pyglet, we suggest you start at Writing a pyglet application.