Skip to main content

FastAPI WebSocket Hex game server with matchmaking, best-of series, win detection, reconnect, and an optional Redis/PostgreSQL state backend

Project description

hexgame-server — Hex game server

FastAPI WebSocket Hex game server with matchmaking, best-of series, server-authoritative gameplay, win detection, reconnect tokens, and an optional Redis/PostgreSQL state backend. Ships with a built-in Vite/React dashboard (/, /docs, /overview, /statistics).

Installing this package gives you the hexgame-server command.

Install

pip install hexgame-server                    # core
pip install "hexgame-server[redis]"           # + Redis state backend
pip install "hexgame-server[postgres]"        # + PostgreSQL completed-series history
pip install "hexgame-server[all]"             # both backends

hexgame-server is independent from the hexgame client distribution — install that one as well only if you want to play against your own server from the same machine.

Run

hexgame-server --host 0.0.0.0 --port 8000
# optional flags: --reload, --workers N (Redis backend required), --log-level info

Then open:

See the main repository README for the full server documentation, WebSocket protocol, deployment options (Docker), and design notes.

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

hexgame_server-0.1.0.tar.gz (100.2 kB view details)

Uploaded Source

File details

Details for the file hexgame_server-0.1.0.tar.gz.

File metadata

  • Download URL: hexgame_server-0.1.0.tar.gz
  • Upload date:
  • Size: 100.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for hexgame_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2632071667b8026b3851ece5023c8efac58c4556c9cc3b40411bc942967e5106
MD5 5edd88c79dcf9e98c7242e85fd1ae022
BLAKE2b-256 24d43ea56560b5a37be7ca1d27939c86377861953237363ded9af958150c1bba

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