A demo script for battlesnake with FastApi and Pydantic
- Clone the repository:
- Install dependencies
- using pip: pip install -r requirements.txt
- using uv: uv sync
- Run the server:
- uvicorn main:app --reload
- Open your browser and go to http://localhost:8000/docs to check the API documentation.
- Run the local hosting script:
- download the hosting script https://github.com/BattlesnakeOfficial/rules/releases
- run the script with the client and name filled in
- for solo testing
battlesnake play -W 11 -H 11 --name <SNAKE_NAME> --url <SNAKE_URL> -g solo -v --browser - for multiplayer
battlesnake play -W 11 -H 11 --name Snake1 --url http://snake1-url-whatever --name Snake2 --url http://snake2-url-whatever --browser
- for solo testing
- See the result in browser