A simple Python 3.6+ library of ArchiSteamFarm IPC API
pip install ASF_IPC
import ASF_IPC as asf
api = asf.IPC(host='127.0.0.1', port=1242, password='blablabla')
data = api.get_asf()
data = api.get_bot('name of bot') # One bot
data = api.get_bot(['name', 'of', 'bots']) # Multiple bots
Note: method get_bot()
returns dict
.
api.delete_bot('name of bot') # One bot
api.delete_bot(['name', 'of', 'bots']) # Multiple bots
api.post_bot('name of bot', config={'BotName': 'foobar'}, keep_sensitive=True)
message = api.command('version')
Note: method command()
returns str
.
data = api.get_structure('ArchiSteamFarm.BotConfig')
data = api.get_type('ArchiSteamFarm.BotConfig')
Note: these methods return dict
, check ASF Wiki for details.
ASF_IPC will raise every single error as an exception.