Tournament statistics
Project description
Statistics for various games
Games supported
- TFT
- Valorant
Install
pip install les-stats
Dev
Install Poetry with version >= 1.2.0a1
Install and setup dependencies
poetry install --with dev
poetry shell
pre-commit install
Run unit test
pytest
Run pre-commit
pre-commit run --all-files
Run
Create an .env
file with this content or create environment variables
LES_STATS_TIMEZONE="TZ database name following https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"
LES_STATS_DB_URL="Your db url following https://tortoise.github.io/databases.html"
LES_STATS_SALT="Salt used to hash API key of internal app"
Optional:
LES_STATS_TFT_API_KEY="tft api key"
LES_STATS_TFT_API_ROUTING="lol api routing"
LES_STATS_VALORANT_API_KEY="valorant api key"
LES_STATS_VALORANT_API_ROUTING="lol api routing"
LES_STATS_APP_HOST="Application bind sotcket to this host (default localhost)"
LES_STATS_APP_PORT="Application bind sotcket with this port (default 8000)"
LES_STATS_EXPORTER_ADDR="Exporter bind sotcket to this host (default localhost)"
LES_STATS_EXPORTER_PORT="Exporter bind sotcket with this port (default 9345)"
LES_STATS_BACKEND_CORS_ORIGINS="[http://localhost.fr,http://test.localhost.fr]"
LES_STATS_SENTRY_DSN="your sentry DSN"
Start the app
python3 -m les_stats.main
Manage API Key
python3 -m les_stats.utils.auth --help
API
APIs documentation are available at http://localhost:8000/docs
Prometheus
Stats are available at http://localhost:9345/metrics
Licence
The code is under CeCILL license.
You can find all details here: https://cecill.info/licences/Licence_CeCILL_V2.1-en.html
Credits
Copyright © Ludovic Ortega, 2022
Contributor(s):
-Ortega Ludovic - ludovic.ortega@lyon-esport.fr
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
les_stats-0.2.2-py3-none-any.whl
(31.9 kB
view hashes)
Close
Hashes for les_stats-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51206cb33cb72ac58574595b0aefdfa48ac416d29eebde2ac58044cabb7df815 |
|
MD5 | a209349f08e30dd13519918230e81560 |
|
BLAKE2b-256 | 16b01b01026f7698f2f676958ef6bcfea612eebe5d62c6485ed2f8300d235ff5 |