A pixel art guessing quiz game
Project description
Pixel Puzzle
A pixel art guessing quiz game. The server reads image files from a folder you point it at, exposes a small JSON API listing them, and ships a static front-end that turns those images into a guess-the-pixel-art quiz.
Features
- FastAPI backend with a single
/api/imagesJSON endpoint. - Static front-end (vanilla HTML/CSS/JS) bundled with the package.
- Long-lived cache headers for versioned assets,
no-cacheforindex.html. - GZip middleware for text payloads.
- Image-folder caching keyed on directory mtime.
- Environment-driven configuration (
HOST,PORT,IMAGE_FOLDER).
Requirements
- Python 3.14 or newer.
Installation
Install with uv as a standalone tool:
uv tool install pixel-puzzle
Or, alternatively, run it ephemerally:
uvx pixel-puzzle
Or, install it into a project virtual environment with:
uv add pixel-puzzle
Usage
Drop pixel art images (.png, .jpg, .jpeg) into a directory, then point
the server at it via the IMAGE_FOLDER environment variable (default: a
folder named images in the current working directory):
IMAGE_FOLDER=/path/to/pixel-art pixel-puzzle
Open http://localhost:8000 and start guessing.
Configuration
| Variable | Default | Description |
|---|---|---|
HOST |
0.0.0.0 |
Interface for uvicorn to bind. |
PORT |
8000 |
TCP port for the HTTP server. |
IMAGE_FOLDER |
./images |
Directory scanned for image files. |
Development
Clone the repository and sync the dev environment:
git clone https://github.com/LucaBarden/Pixel-Puzzle.git
cd Pixel-Puzzle
uv sync --extra dev
Run the test suite:
uv run pytest
Run the server from a working copy:
uv run pixel-puzzle
Project layout
src/pixel_puzzle/
__init__.py
__main__.py # console-script entry point
app.py # FastAPI application
static/ # HTML, JS, CSS, fonts
tests/
pyproject.toml
License
MIT. See the project metadata in pyproject.toml for the canonical notice.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixel_puzzle_game-1.1.0.tar.gz.
File metadata
- Download URL: pixel_puzzle_game-1.1.0.tar.gz
- Upload date:
- Size: 101.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81cad4fb4c947b1cebe28a86c1e8b64009c9270d396e5c8b60f2e6c7f029f808
|
|
| MD5 |
b5e03f1077111c4a94124356bd98afc2
|
|
| BLAKE2b-256 |
b757b4f7d011c5d77c257edd391ebbfc5ad730330514c8fa9a08c67d3e995748
|
File details
Details for the file pixel_puzzle_game-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pixel_puzzle_game-1.1.0-py3-none-any.whl
- Upload date:
- Size: 103.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
311eb8320e8aa58e89564f3872f05673cf74ccdbe8d3568be074a997b9dc1480
|
|
| MD5 |
1750c502b47ea9c8d3d653fddc22dc7e
|
|
| BLAKE2b-256 |
71533c72c98da727acda33ad68265b26cc1aac285d75e07357bb01a492eb2e71
|