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.
At execution a 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sc2monitor-0.2.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ecef46d6b7e47059927f89720514bd905d766655e84796841872548d3d47b4 |
|
MD5 | be945d5e0a37e5ae7a4ad9524a2075b9 |
|
BLAKE2b-256 | 2787cee124f7143f4db927b0db9efdc1806c7513bc1e52d8ed6dd53190453c2a |