Skip to main content

Statistics for various games (save game in system and filter statistics based on Event, Tournament or Stage)

PyPI PyPI versions Python test Code Style

Games supported

  • TFT
  • Valorant (work in progress)
  • LoL (work in progress)

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="tft api routing"
LES_STATS_VALORANT_API_KEY="valorant api key"
LES_STATS_VALORANT_API_ROUTING="valorant api routing"
LES_STATS_LOL_API_KEY="lol api key"
LES_STATS_LOL_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://<LES_STATS_APP_HOST>:<LES_STATS_APP_PORT>/docs

Prometheus

Stats are available at http://<LES_STATS_EXPORTER_ADDR>:<LES_STATS_EXPORTER_PORT>/metrics (work in progess)

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

Metadata

Release files for les-stats 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for les-stats 0.3.1
File Interpreter ABI Platform
les_stats-0.3.1-py3-none-any.whl Python 3 none any Details

Release files / les_stats-0.3.1-py3-none-any.whl

Download URL les_stats-0.3.1-py3-none-any.whl
Size 67.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d63785774db605e28dde57950adbbc1f1b3a007932a38c94e70bd3d46c99b326
BLAKE2b-256 checksum
How to use checksums
850dd98e2060aa824d86d690d6495212564153bb50234ef465abdb6c0e635be3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0b1 CPython/3.11.1 Linux/5.15.0-1024-azure

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3.0

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page