[![codecov](https://codecov.io/gh/Whist-Team/Whist-Server/branch/main/graph/badge.svg)](https://codecov.io/gh/Whist-Team/Whist-Server)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
![PyPI](https://img.shields.io/pypi/v/whist-server)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/whist-server)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/whist-server)
![GitHub repo size](https://img.shields.io/github/repo-size/whist-team/whist-server)
![Lines of code](https://img.shields.io/tokei/lines/github/whist-team/whist-server)
![PyPI - Downloads](https://img.shields.io/pypi/dm/whist-server)
![PyPI - License](https://img.shields.io/pypi/l/whist-server)
# 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`.
Raw data
{
"_id": null,
"home_page": "https://github.com/Whist-Team/Whist-Server",
"name": "whist-server",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "game,server,whist",
"author": "Whist-Team",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/a9/dd/3fa674fb6e00f994d273d46f1f721ff7853275215965a05b1bce6bb55ed8/whist_server-0.8.0.tar.gz",
"platform": null,
"description": "[![codecov](https://codecov.io/gh/Whist-Team/Whist-Server/branch/main/graph/badge.svg)](https://codecov.io/gh/Whist-Team/Whist-Server)\n[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)\n![PyPI](https://img.shields.io/pypi/v/whist-server)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/whist-server)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/whist-server)\n![GitHub repo size](https://img.shields.io/github/repo-size/whist-team/whist-server)\n![Lines of code](https://img.shields.io/tokei/lines/github/whist-team/whist-server)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/whist-server)\n![PyPI - License](https://img.shields.io/pypi/l/whist-server)\n\n# Whist-Server\n\nThis is the REST API server of a Whist game. It provides user management, session organization and\na convenient interface for the rules' implementation of\n[Whist-Core](https://github.com/Whist-Team/Whist-Core).\n\n## Development\n\n### Setup\nYou need [Poetry](https://python-poetry.org/) for development.\n```bash\n# Create venv and install deps\npoetry install\n```\nThe Python virtual environment will be created in the `.venv` directory.\n\n### Run tests/lint\n```bash\n# Run tests (in venv)\npython -m pytest # or pylint...\n# OR\npoetry run python -m pytest\n```\n\n### Build\nGenerates `sdist` and `bdist_wheel`.\n```bash\npoetry build\n```\n\n### Publish\n\nYou need the environment variable `POETRY_PYPI_TOKEN_PYPI` filled with a PyPI token.\n\n```bash\npoetry build\npoetry publish\n# OR\npoetry publish --build\n```\n\n### Run\n\nIn order to use GitHub SSO you need to set two environment variables. At the moment they are\nmandatory.\n\n```dotenv\nGITHUB_CLIENT_ID # This is the GitHub Identifier\nGITHUB_CLIENT_SECRET # During creation this secret is generated.\nGITHUB_REDIRECT_URL=http://HOST:PORT/oauth2/github/ # Only required for Browser Application with the ability to redirect.\n```\n\n---\n\n#### Splunk\n\nIf you want to use Splunk you require an environment variable with the authentication token: \n`SPLUNK_TOKEN` and you have to start the server with optional arguments `--splunk_host` and \n`--splunk-port`.\n\nSplunk support is currently disabled.\n\n---\n\nIn order to run the application it must be started like this:\n\n```shell\npython -m whist_server --reload --admin_name=root --admin_pwd=password 0.0.0.0 8080\n```\n\n:warning: A mongodb instance is required to run before launching the `Whist-Server`.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Whist server implementation",
"version": "0.8.0",
"project_urls": {
"Bug Tracker": "https://github.com/Whist-Team/Whist-Server/issues",
"Homepage": "https://github.com/Whist-Team/Whist-Server",
"Repository": "https://github.com/Whist-Team/Whist-Server"
},
"split_keywords": [
"game",
"server",
"whist"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8dc654ac4ebd474b668b9562d641e2d6378359e32ad6df937c10b452a62a123a",
"md5": "580b0e12306d106dfc145e089a52ff0e",
"sha256": "850f9e993c29f15d903a5544f11f2132167b13ad5859e85cdc13ba4e7564d9e5"
},
"downloads": -1,
"filename": "whist_server-0.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "580b0e12306d106dfc145e089a52ff0e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 38948,
"upload_time": "2024-02-11T18:43:41",
"upload_time_iso_8601": "2024-02-11T18:43:41.914713Z",
"url": "https://files.pythonhosted.org/packages/8d/c6/54ac4ebd474b668b9562d641e2d6378359e32ad6df937c10b452a62a123a/whist_server-0.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a9dd3fa674fb6e00f994d273d46f1f721ff7853275215965a05b1bce6bb55ed8",
"md5": "698525fca14d70963b5810d53e9aa8cc",
"sha256": "9eaaf1e22f44709fbc9f243fca80686da84e7118076d5cb863f79aa892d98b12"
},
"downloads": -1,
"filename": "whist_server-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "698525fca14d70963b5810d53e9aa8cc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 44419,
"upload_time": "2024-02-11T18:43:43",
"upload_time_iso_8601": "2024-02-11T18:43:43.838307Z",
"url": "https://files.pythonhosted.org/packages/a9/dd/3fa674fb6e00f994d273d46f1f721ff7853275215965a05b1bce6bb55ed8/whist_server-0.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-11 18:43:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Whist-Team",
"github_project": "Whist-Server",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "whist-server"
}