SteamCMD Python wrapper to persist steam's login sessions
Project description
Py-SteamCMD-Subprocess-Wrapper
Usage example
from steamcmd_wrapper import get_steamcmd_client
client = get_steamcmd_client("//Steam")
client.set_install_dir("/steamcmd") # SteamCMD official docs recommend setting dir before login
client.login_as_anonymous() # or client.login(user, password) if you need to own the game
client.update_app("app_id")
client.update_workshop_mod("app_id", "mod_id")
Dependencies
You need to be able to manually run SteamCMD on your OS.
For Debian-Based Distributions (Ubuntu, Mint, etc.) this should be enough:
apt-get install lib32gcc1 # Debian
for details visit official docs: SteamCMD docs Known Issues
Purpose
Simple wrapper to make it easier to use SteamCMD with python.
The idea came when I tried to install 100+ mods to Arma 3. Those mods varied in size from 2 KB to +20 GB. To automate this I tried using other automation libraries, but they didn't solve the problem as they were simply invoking.
./steamcmd.sh +login {username} {password} {2fa} +workshop_download_item 107410 450814997 +quit
multiple times which could lead to timeouts due to 2FA rate limiting. Which created need of persistent client.
Notes
- Disabling 2FA only moves the problem further as without 2FA you get the code on your e-mail which makes it even harder to automate
- Some games (Arma 3 included) and their server require logged user to own the original game, so we cannot login as anonymous
- Custom script for SteamCMD looks good on paper however you have to keep in mind that SteamCMD is bad. It can randomly timeout while downloading mods (especially if they are big in size). If SteamCMD fails in the middle of the script you would need to manually amend the script or risk running it again unchanged, which would validate all apps/mods again risking yet another timeout.
- Originally I used it to run it on Jenkins Pipeline to keep mods updates on my machine.
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 py_steamcmd_subprocess_wrapper-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 288011289d03ea1d168599c25f2f9224d5ee043dc70d6cd0e2fb56f7ec37827b |
|
MD5 | 3cecba1585cd647b33425cb9c5730889 |
|
BLAKE2b-256 | d682def409e7ff9663ee677060d7a6ccc547b93768ab08156dae1ef4c25e9f5b |
Hashes for Py_SteamCMD_Subprocess_Wrapper-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9775675e621f98a20d392a8e4017b1f4ea40ee167d4a76c3396de674bfabb25e |
|
MD5 | 164449ec6a7d634f3ee0d223f9d78a5d |
|
BLAKE2b-256 | 2eaddf1e7427b2897d6893f3a5441014fcb7737f3e1e7270a073c7bab4ae5850 |