Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/victorgoubet/capitalquest
The best capital quizz of the world
https://github.com/victorgoubet/capitalquest
api capital fastapi pydantic python quizz streamlit webapp
Last synced: 6 days ago
JSON representation
The best capital quizz of the world
- Host: GitHub
- URL: https://github.com/victorgoubet/capitalquest
- Owner: VictorGoubet
- Created: 2024-09-11T13:48:08.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-07T15:31:48.000Z (about 1 month ago)
- Last Synced: 2024-10-17T03:27:04.775Z (21 days ago)
- Topics: api, capital, fastapi, pydantic, python, quizz, streamlit, webapp
- Language: Python
- Homepage:
- Size: 788 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
Capital Quest
Test your knowledge of world capitals with this interactive quiz game!
ยท Play here ยท## Table of Contents ๐
- [Play the Game](#play-the-game-)
- [Installation for Developers](#installation-for-developers-)
- [Prerequisites](#prerequisites)
- [Option 1: Git Clone](#option-1-git-clone-)
- [Option 2: Docker](#option-2-docker-)
## Play the Game ๐
Play Capital Quest [here][game-url]
## Installation for Developers ๐ ๏ธ
If you want to run Capital Quest locally, follow these steps:
### Prerequisites
- Python 3.10 or higher
- Git### Option 1: Git Clone ๐
1. Clone the repository:
```bash
git clone https://github.com/VictorGoubet/capitalquest.git
cd capitalquest
```2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Run the application:
```bash
python launch.py
```This will start both the API and front-end components in development mode.
Customize with options:
- `--env`: Choose between `dev` (default) or `prod` environments
- `--component`: Run `api`, `front`, or `both` (default) components
- `--api-host`, `--api-port`: Set custom API host/port (default: localhost:8000)
- `--front-host`, `--front-port`: Set custom front-end host/port (default: localhost:8051)Example:
```bash
python launch.py --env prod --component api --api-port 8080
```Note: You can also set these options using environment variables or a .env file:
```bash
export api_host=localhost
export api_port=8000
export front_host=localhost
export front_port=8051
export environment=dev
```4. Open your browser and navigate to `http://localhost:8051` (or your custom front-end port)
### Option 2: Docker ๐ณ
A Docker image is available for easy setup:
1. Pull the Docker image:
```bash
docker pull victorgoubet/capitalquest:latest
```2. Run the container:
```bash
docker run -p 8051:8051 victorgoubet/capitalquest:latest
```3. Access the game at `http://localhost:8051`
---
[game-url]: https://capitalquest-nvde.onrender.com/