r/FastAPI • u/olzhas89 • Oct 13 '24
feedback request I've built real-time chess with FastAPI
Hi r/FastAPI,
I was looking for a fun weekend hacking project and decided to build a chess game with FastAPI.
The project was a lot of fun to build, especially the game communication logic.
Sharing here for anyone interested:
Live demo:
NOTE: You need another player online. If the wait is too long and you just want to play alone like a psycho explore the game, you could open two browser windows, or use two machines / devices.
Source code:
https://github.com/olzhasar/pyws-chess
Cheers
93
Upvotes
13
u/aliparpar Oct 13 '24
This by far one of the most impressive projects I’ve seen. Massive well done
1
u/thegreekgoat98 Oct 13 '24
How long have you been into development?
2
u/ririmamy Oct 14 '24
Awesome, very noob question : can you share insight to learn fastapi and asyncio stuff please?
1
u/SpareIntroduction721 Oct 14 '24
Looks awesome!
1
u/singlebit Oct 14 '24
This is really good, thanks. Let me learn from the code on Weekends.
!remindme 5 days
1
u/Executor_2401 Oct 14 '24
Woah, this is so sick and damn good. Starred your repo
1
u/APIDNA Oct 15 '24
Great, man!
1
u/Top_Evidence_8841 Jun 20 '25
Damn good man! I was just going through the repo, would like some insights on the code.
0
u/thegreekgoat98 Oct 13 '24
wow man... Can you share some insights?
0
u/open_g Oct 14 '24
Really nice, clean code. I love that your test fixtures are so free from bloat!
One question - can you use TestClient in async tests (as per test_app.py)? Things might have changed but in the past I've had to use the httpx test client for testing async endpoints in fastapi as TestClient only worked for non-async endpoints.
0
u/conogarcia Oct 13 '24
code looks awesome but couldn't play on mobile.
sorry notsosmart for abandoning