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.
Metadata
Release files for sc2monitor 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sc2monitor-0.3.2.tar.gz | 18.8 kB | Without provenance | Details for sc2monitor-0.3.2.tar.gz |
Release files / sc2monitor-0.3.2.tar.gz
| Download URL | sc2monitor-0.3.2.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
769bc532ac107ddecae9551408a68031be4257bd596a54ae07d0c42b37508fbe
|
|
BLAKE2b-256 checksum How to use checksums |
b4a514c97be93fd6279a0138f56c0b34fc5b655b709f77e15626c8330a820be0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.1
|
Security for sc2monitor 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.