Skip to main content

Luma

Luma Engine is a lightweight Python game engine powered by SDL3

Installation

python -m pip install luma-engine

Quick Start

Create a file named main.py:

from luma import Luma


engine = Luma()
engine.create_window("Luma", 640, 480)
graphics = engine.Graphics


@engine.draw
def draw():
	graphics.setDrawColor(40, 120, 220)
	graphics.drawRect(220, 160, 200, 120)
	graphics.resetDrawColor()


@engine.update
def update(dt):
	# Update game state here. dt is elapsed time in seconds.
	pass


@engine.on(Luma.EVENTS.KEYPRESS)
def on_key_press(key):
	if key == engine.Keyboard.KEYS.SPACE:
		print("Space pressed")


engine.run()

Run it with:

python main.py

Examples

The repository includes complete examples in the examples directory, including a Pong game:

python examples/pong.py

Docs

Documentation is available here

Requirements

  • Python 3.10 or newer
  • An SDL3-compatible system

License

Luma Engine is released under the MIT License.

Metadata

Release files for luma-engine 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luma-engine 0.2.5
File Size Uploaded Provenance Actions
luma_engine-0.2.5.tar.gz 6.1 MB Without provenance Details for luma_engine-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for luma-engine 0.2.5
File Interpreter ABI Platform Actions
luma_engine-0.2.5-py3-none-any.whl Python 3 none any Details for luma_engine-0.2.5-py3-none-any.whl

Total release size: 12.2 MB

Release files / luma_engine-0.2.5.tar.gz

Download URL luma_engine-0.2.5.tar.gz
Size 6.1 MB
Tags Source
SHA-256 checksum
How to use checksums
7ff77a6fdb6852091cefcb6130b5f62a060fe791eb1455d4679799fd6843de88
BLAKE2b-256 checksum
How to use checksums
c7e4eb5844959dd30634d78d7877dcc500f33ff37de9298fbcbff8b7b6d39fa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / luma_engine-0.2.5-py3-none-any.whl

Download URL luma_engine-0.2.5-py3-none-any.whl
Size 6.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e292749f0fb46134a079266dd106893ce3458b9a3f6798525485d2bbc973dc06
BLAKE2b-256 checksum
How to use checksums
51b2687bf6562de0ea84667e03e0ee71a00fe5d15bf863afcd1601e545855aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Security for luma-engine 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page