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.0.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.0.0-py3-none-any.whl (103.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pixel_puzzle_game-1.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 d868d8a35e0684483949102952776e01cf441367a5dba605f47c867136272672
MD5 4973d611e7ee822c28a78ffc97e02b0b
BLAKE2b-256 b9b4545d277553e2e622680d28317241188655fa3a666c66d198291c831b68db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pixel_puzzle_game-1.0.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bde7876434c43a98262a092ec8a8e69516f2b7032652405f84bf065b5558f1bd
MD5 21434d7ec5770d455c6606f77a0d6f34
BLAKE2b-256 0f59af8b3ac832aa4ea83ece604be3d71e1b8baa0d046c5ce247e5bb2e21429b

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