Skip to main content

When executed regularly keeps track of medium amount of StarCraft 2 accounts on the 1vs1 ladder

Project description

sc2monitor

Python (>=3.7.1) script that when executed regularly keeps track of medium amount StarCraft 2 accounts on the 1vs1 ladder

Installation

Install this Python 3 package via pip by executing pip install sc2monitor

Execution

To collect data run the following script regularly (every 5-15 minutes), e.g. via cronjob:

import sc2monitor

sc2monitor.init(host='db-host',
                user='db-user',
                passwd='db-password',
                db='db-database',
                protocol='db-protocol',
                apikey='your-bnet-api-key',
                apisecret='your-bnet-api-secret')
sc2monitor.run()

Your API-key your-bnet-api-key and secret your-bnet-api-secret have to be created by registering an application at https://develop.battle.net/access/ and have to be passed only once or when you want to change them. If not specified mysql+pymysql will be used as database protocol - other protocol options can be found at https://docs.sqlalchemy.org/en/latest/dialects/.

If not executed reguarly the script will try to make an educated guess for games played since the last execution.

Execution protocol will automatically logged to the database.

You can add players to monitor either by passing their StarCraft 2 URL:

sc2monitor.add_player('https://starcraft2.com/en-gb/profile/2/1/221986')

Data

The collected data (including statistics) can be accessed via the database tables.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sc2monitor-0.2.6.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

sc2monitor-0.2.6-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file sc2monitor-0.2.6.tar.gz.

File metadata

  • Download URL: sc2monitor-0.2.6.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for sc2monitor-0.2.6.tar.gz
Algorithm Hash digest
SHA256 d0b57f4483da1d89f51f73d9a9f558e01304be1ef5a7a482a68e052e295f6cb5
MD5 928703d20df9412cad54f4af73e4552b
BLAKE2b-256 f9a7b34860f97d204e80837835002d030d4161a7e4c313ad4ca3cd2ffae2d72a

See more details on using hashes here.

File details

Details for the file sc2monitor-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: sc2monitor-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for sc2monitor-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f821d5a4bb6d38eb94ef0daeaf400fee8de56462f808dd781cf55c2256f52a54
MD5 419b150403080caefd994ea186ef958c
BLAKE2b-256 627daf3c851e90f2a5a0dfdad41a7fbbdc4223c7e6b5196253be0b9e04316764

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page