Skip to content


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

Battlesnake Python Starter Project

An official Battlesnake template written in Python. Get started at

Battlesnake Logo

This project is a great starting point for anyone wanting to program their first Battlesnake in Python. It can be run locally or easily deployed to a cloud provider of your choosing. See the Battlesnake API Docs for more detail.

Run on Replit

Technologies Used

This project uses Python 3 and Flask. It also comes with an optional Dockerfile to help with deployment.

Run Your Battlesnake

Install dependencies using pip

pip install -r requirements.txt

Start your Battlesnake


You should see the following output once it is running

Running your Battlesnake at
 * Serving Flask app 'My Battlesnake'
 * Debug mode: off

Open localhost:8000 in your browser and you should see


Play a Game Locally

Install the Battlesnake CLI

Command to run a local game

battlesnake play -W 11 -H 11 --name 'Python Starter Project' --url http://localhost:8000 -g solo --browser

Next Steps

Continue with the Battlesnake Quickstart Guide to customize and improve your Battlesnake's behavior.

Note: To play games on you'll need to deploy your Battlesnake to a live web server OR use a port forwarding tool like ngrok to access your server locally.