les-stats


Nameles-stats JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/lyon-esport/stats
SummaryTournament statistics
upload_time2023-01-05 13:48:06
maintainer
docs_urlNone
authorLudovic Ortega
requires_python>=3.8,<4.0
licenseCeCILL
keywords lol esport statistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Statistics for various games (save game in system and filter statistics based on Event, Tournament or Stage)

[![PyPI](https://img.shields.io/pypi/v/les-stats.svg)](https://pypi.python.org/pypi/les-stats)
[![PyPI versions](https://img.shields.io/pypi/pyversions/les-stats.svg)](https://pypi.python.org/pypi/les-stats)
[![Python test](https://github.com/lyon-esport/stats/actions/workflows/test.yml/badge.svg)](https://github.com/lyon-esport/stats/actions/workflows/test.yml)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

# Games supported
- TFT
- Valorant (work in progress)
- LoL (work in progress)

# Install
```bash
pip install les-stats
```

# Dev
Install [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer) 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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lyon-esport/stats",
    "name": "les-stats",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "lol,esport,statistics",
    "author": "Ludovic Ortega",
    "author_email": "ludovic.ortega@lyon-esport.fr",
    "download_url": "",
    "platform": null,
    "description": "Statistics for various games (save game in system and filter statistics based on Event, Tournament or Stage)\n\n[![PyPI](https://img.shields.io/pypi/v/les-stats.svg)](https://pypi.python.org/pypi/les-stats)\n[![PyPI versions](https://img.shields.io/pypi/pyversions/les-stats.svg)](https://pypi.python.org/pypi/les-stats)\n[![Python test](https://github.com/lyon-esport/stats/actions/workflows/test.yml/badge.svg)](https://github.com/lyon-esport/stats/actions/workflows/test.yml)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n# Games supported\n- TFT\n- Valorant (work in progress)\n- LoL (work in progress)\n\n# Install\n```bash\npip install les-stats\n```\n\n# Dev\nInstall [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer) with version >= 1.2.0a1\n\nInstall and setup dependencies\n```\npoetry install --with dev\npoetry shell\npre-commit install\n```\n\n### Run unit test\n```\npytest\n```\n\n### Run pre-commit\n```\npre-commit run --all-files\n```\n\n# Run\nCreate an `.env` file with this content or create environment variables\n```\nLES_STATS_TIMEZONE=\"TZ database name following https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\"\nLES_STATS_DB_URL=\"Your db url following https://tortoise.github.io/databases.html\"\nLES_STATS_SALT=\"Salt used to hash API key of internal app\"\n\nOptional:\nLES_STATS_TFT_API_KEY=\"tft api key\"\nLES_STATS_TFT_API_ROUTING=\"tft api routing\"\nLES_STATS_VALORANT_API_KEY=\"valorant api key\"\nLES_STATS_VALORANT_API_ROUTING=\"valorant api routing\"\nLES_STATS_LOL_API_KEY=\"lol api key\"\nLES_STATS_LOL_API_ROUTING=\"lol api routing\"\nLES_STATS_APP_HOST=\"Application bind sotcket to this host (default localhost)\"\nLES_STATS_APP_PORT=\"Application bind sotcket with this port (default 8000)\"\nLES_STATS_EXPORTER_ADDR=\"Exporter bind sotcket to this host (default localhost)\"\nLES_STATS_EXPORTER_PORT=\"Exporter bind sotcket with this port (default 9345)\"\nLES_STATS_BACKEND_CORS_ORIGINS=\"[http://localhost.fr,http://test.localhost.fr]\"\nLES_STATS_SENTRY_DSN=\"your sentry DSN\"\n```\n\nStart the app\n```\npython3 -m les_stats.main\n```\n\nManage API Key\n```\npython3 -m les_stats.utils.auth --help\n```\n\n# API\nAPIs documentation are available at http://<LES_STATS_APP_HOST>:<LES_STATS_APP_PORT>/docs\n\n# Prometheus\nStats are available at http://<LES_STATS_EXPORTER_ADDR>:<LES_STATS_EXPORTER_PORT>/metrics (work in progess)\n\n# Licence\n\nThe code is under CeCILL license.\n\nYou can find all details here: https://cecill.info/licences/Licence_CeCILL_V2.1-en.html\n\n# Credits\n\nCopyright \u00a9 Ludovic Ortega, 2022\n\nContributor(s):\n\n-Ortega Ludovic - ludovic.ortega@lyon-esport.fr\n",
    "bugtrack_url": null,
    "license": "CeCILL",
    "summary": "Tournament statistics",
    "version": "0.3.1",
    "split_keywords": [
        "lol",
        "esport",
        "statistics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "850dd98e2060aa824d86d690d6495212564153bb50234ef465abdb6c0e635be3",
                "md5": "a2a2bbca21a0d821ff8880ba1bd98b47",
                "sha256": "d63785774db605e28dde57950adbbc1f1b3a007932a38c94e70bd3d46c99b326"
            },
            "downloads": -1,
            "filename": "les_stats-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a2a2bbca21a0d821ff8880ba1bd98b47",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 67173,
            "upload_time": "2023-01-05T13:48:06",
            "upload_time_iso_8601": "2023-01-05T13:48:06.292856Z",
            "url": "https://files.pythonhosted.org/packages/85/0d/d98e2060aa824d86d690d6495212564153bb50234ef465abdb6c0e635be3/les_stats-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-05 13:48:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "lyon-esport",
    "github_project": "stats",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "les-stats"
}
        
Elapsed time: 0.02494s