--- id: pyglet version: "2.1.16" license: unclear license_treatment: unclear maintenance: active --- # pyglet — pyglet is a cross-platform games and multimedia package. License: unclear · Maintenance: active · Downloads: 2.8M/mo ## What it is and what it does pyglet is a pure-Python cross-platform library for building games and multimedia applications on Windows, macOS, and Linux. It handles windowing, OpenGL graphics rendering, input events (keyboard, mouse, joysticks), and multimedia playback (images, audio, video) without requiring external Python dependencies—only system libraries for audio and graphics on Linux. The library uses ctypes to interface with native platform libraries, allowing it to run on standard Python and PyPy without compilation steps. Developers use pyglet to build 2D and 3D games, interactive visualizations, and multimedia applications. It supports multiple windows, multi-monitor setups, and fullscreen rendering. For audio and video, it can use FFmpeg for a wide range of compressed formats or rely on built-in support for standard formats like WAV and PNG. The library is actively maintained with an upcoming major version (3.0) that will add multiple rendering backends and WebGL support. Use it for: - Build 2D or 3D games with OpenGL graphics and cross-platform input handling - Create interactive multimedia applications with audio and video playback - Develop fullscreen applications or games that span multiple monitors - Package and distribute Python games using tools like PyInstaller or Nuitka - Build visualizations or simulations requiring real-time graphics rendering ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyglet is a cross-platform windowing and multimedia library for Python that provides graphics, input handling, and audio/video playback for games and visually rich applications. Yes, if you are building games or multimedia applications in Python and want a lightweight, dependency-free solution. The active maintenance, zero runtime dependencies, and cross-platform support make it a solid choice. However, verify the license terms for your use case, and be aware that version 3.0 is coming soon with potential API changes if you use OpenGL directly. ## Install pip install pyglet uv add pyglet poetry add pyglet ## Installing pyglet Before you install: Installation is straightforward with no external runtime dependencies beyond Python itself. The package is actively maintained with a recent release, and being pure Python with no compilation steps, it installs cleanly across platforms. License in practice: License treatment is unclear from the metadata, though the description states pyglet is provided under the BSD open-source license allowing both commercial and open-source use. Verify the actual license terms before relying on this for commercial projects. Quickstart: pip install pyglet import pyglet window = pyglet.window.Window() pyglet.app.run() Requires Python 3.8+. On Linux, system libraries (OpenGL/GLX, GDK 2.0+ or Pillow, OpenAL or Pulseaudio) must be installed. OpenGL 3.3+ is required as of pyglet 2.0. Verify before relying: - Exact scope of BSD license terms and any restrictions for specific use cases - Whether version 3.0 migration will require significant code changes for existing applications - Performance characteristics when rendering thousands of objects on different platforms ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python game development library, cross-platform windowing graphics, opengl python multimedia, python game engine lightweight, audio video playback python, input handling joystick controller, pure python graphics rendering, game-development, multimedia, graphics-rendering [View on SkillFed](https://skillfed.io/packages/pyglet) · [View on PyPI](https://pypi.org/project/pyglet/)