Game server in python intended for a container
|
2 năm trước cách đây | |
---|---|---|
api | 2 năm trước cách đây | |
client | 2 năm trước cách đây | |
.gitignore | 2 năm trước cách đây | |
README.md | 2 năm trước cách đây | |
requirements.txt | 2 năm trước cách đây |
A game server to provide simple games, intended for testing of strategies, AI, and general playing around. As such, do not expect strong anti-cheat mechanisms, or really much of anything other than an impartial game server that can run separately from the client code.
Dreaming it up.
All of this is brand new to me, so expect mistakes and amateur moves.
Giving FastAPI a shot. FastAPI inherits starlette, so look into that functionality some day, too. Expects a redis container/cluster somewhere to store data.
At this point, almost all operations use POST
FastAPI recommendation is "if your [function] doesn't have to communicate with anything else and wait for it to respond, use async def
instead of def
".
Auto Generated API docs are here Schema is here
For curl, you may want to follow redirects:
curl --location http://127.0.0.1:8000/example
Request bodies use pydantic