Code Monkey home page Code Monkey logo

stats's Introduction

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

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

Import matches

python3 -m les_stats.utils.import_match --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 - [email protected]

stats's People

Contributors

m0nsterrr avatar dependabot[bot] avatar egguy avatar

Watchers

Franck LOURME avatar Kostas Georgiou avatar  avatar

stats's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.