https://github.com/whist-team/whist-server
Whist server implementation
https://github.com/whist-team/whist-server
fastapi game hacktoberfest pymongo python server whist
Last synced: 11 months ago
JSON representation
Whist server implementation
- Host: GitHub
- URL: https://github.com/whist-team/whist-server
- Owner: Whist-Team
- License: mit
- Created: 2021-04-11T18:37:50.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-06-18T11:11:25.000Z (about 1 year ago)
- Last Synced: 2025-06-18T12:20:47.825Z (about 1 year ago)
- Topics: fastapi, game, hacktoberfest, pymongo, python, server, whist
- Language: Python
- Homepage:
- Size: 3.42 MB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://codecov.io/gh/Whist-Team/Whist-Server)
[](https://github.com/PyCQA/bandit)







# Whist-Server
This is the REST API server of a Whist game. It provides user management, session organization and
a convenient interface for the rules' implementation of
[Whist-Core](https://github.com/Whist-Team/Whist-Core).
## Development
### Setup
You need [Poetry](https://python-poetry.org/) for development.
```bash
# Create venv and install deps
poetry install
```
The Python virtual environment will be created in the `.venv` directory.
### Run tests/lint
```bash
# Run tests (in venv)
python -m pytest # or pylint...
# OR
poetry run python -m pytest
```
### Build
Generates `sdist` and `bdist_wheel`.
```bash
poetry build
```
### Publish
You need the environment variable `POETRY_PYPI_TOKEN_PYPI` filled with a PyPI token.
```bash
poetry build
poetry publish
# OR
poetry publish --build
```
### Run
In order to use GitHub SSO you need to set two environment variables. At the moment they are
mandatory.
```dotenv
GITHUB_CLIENT_ID # This is the GitHub Identifier
GITHUB_CLIENT_SECRET # During creation this secret is generated.
GITHUB_REDIRECT_URL=http://HOST:PORT/oauth2/github/ # Only required for Browser Application with the ability to redirect.
```
---
#### Splunk
If you want to use Splunk you require an environment variable with the authentication token:
`SPLUNK_TOKEN` and you have to start the server with optional arguments `--splunk_host` and
`--splunk-port`.
Splunk support is currently disabled.
---
In order to run the application it must be started like this:
```shell
python -m whist_server --reload --admin_name=root --admin_pwd=password 0.0.0.0 8080
```
:warning: A mongodb instance is required to run before launching the `Whist-Server`.