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/luca/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-0.5.2.tar.gz (100.9 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-0.5.2-py3-none-any.whl (103.0 kB view details)

Uploaded Python 3

File details

Details for the file pixel_puzzle_game-0.5.2.tar.gz.

File metadata

  • Download URL: pixel_puzzle_game-0.5.2.tar.gz
  • Upload date:
  • Size: 100.9 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-0.5.2.tar.gz
Algorithm Hash digest
SHA256 3b6729bc93c2ec44963a7e55d71b1ca8a3abad537e0e8d8bbf7e6b5d6d35a8a4
MD5 4b00e2e4c343b3cd1ccc2da64ad89193
BLAKE2b-256 b6bebbf7d06b4fae80c7ab7ec34904ef9830a3e07776b06e7e3d1ea52c46a1bb

See more details on using hashes here.

File details

Details for the file pixel_puzzle_game-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: pixel_puzzle_game-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 103.0 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-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e7144cae6779c5b015293cc5007b6a624de90d11e8316487c157ffece7c3ff4
MD5 09bb8c29cd782fde48d3d8a59fd996dc
BLAKE2b-256 6b89dfecf90d617d4b402012e94ca1990093b1907b0fea9d764aeca054819c67

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