This is a simple API built with FastAPI that allows users to retrieve information about games. The API uses a MongoDB database to store and retrieve game data.
GET /game/{name}: Returns information about the game with the specified nameGET /games/top/{amount}: Returns the topamounthighest rated games
- Clone the repository:
git clone https://github.com/OriginalDCAM/fastapi-game-api.git- Install the dependencies:
pip install -r requirements.txt-
Set up a MongoDB database and update the connection string in:
games.py -
Import the
steamdb.jsonfile into the MongoDB Database
- Start the API:
uvicorn main:app- Send requests to the endpoints listed above.
- FastAPI
- Motor (asyncio-base Python driver for MongoDB)