Skip to main content

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/images JSON endpoint.
  • Static front-end (vanilla HTML/CSS/JS) bundled with the package.
  • Long-lived cache headers for versioned assets, no-cache for index.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

pixel_puzzle_game-1.1.0.tar.gz (101.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixel_puzzle_game-1.1.0-py3-none-any.whl (103.2 kB view details)

Uploaded Python 3

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

Hashes for pixel_puzzle_game-1.1.0.tar.gz
Algorithm Hash digest
SHA256 81cad4fb4c947b1cebe28a86c1e8b64009c9270d396e5c8b60f2e6c7f029f808
MD5 b5e03f1077111c4a94124356bd98afc2
BLAKE2b-256 b757b4f7d011c5d77c257edd391ebbfc5ad730330514c8fa9a08c67d3e995748

See more details on using hashes here.

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

Hashes for pixel_puzzle_game-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 311eb8320e8aa58e89564f3872f05673cf74ccdbe8d3568be074a997b9dc1480
MD5 1750c502b47ea9c8d3d653fddc22dc7e
BLAKE2b-256 71533c72c98da727acda33ad68265b26cc1aac285d75e07357bb01a492eb2e71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page