Skip to main content

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

Project description

Python Versions PyPi License Build Status Codacy Badge codecov Requirements Status

sc2monitor

Python (>=3.7) 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 regularly the script will try to make an educated guess for games played since the last execution.

At execution a protocol will be automatically logged to the database.

You can add and remove players to the monitor by passing their StarCraft 2 URL:

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

# Removing a player
sc2monitor.remove_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.33.tar.gz (18.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: sc2monitor-0.2.33.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.1

File hashes

Hashes for sc2monitor-0.2.33.tar.gz
Algorithm Hash digest
SHA256 2fc1a29a7add177c5821d615a4cab8c9ef399af2befd81e523ba67aad2bbcae0
MD5 31f33e184d80b00f922a7acc26268e15
BLAKE2b-256 57453b438dc485699614d2afff32206b9cda0abc345e9670dd459b7f0fff0b61

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