Python wrapper for the Trackobot API
Project description
trackopy
Overview
trackopy is a Python 3 wrapper library for the Track-o-bot API. It requires the requests module and Python 3. No, it does not support Python 2.
Installation
pip install trackopy
Usage
The library relies on the Trackobot class. All methods are documented and easy to use.
import trackopy # from trackopy import * # from trackopy import Trackobot # All of the above are valid # You can create new users if you do not already have an account # The returned data will look like {'username': 'foo-bar-1234', 'password': 'abcdefgh'} user = trackopy.Trackobot.create_user() trackobot = trackopy.Trackobot(user['username'], user['password']) # Generate a profile link url = trackobot.one_time_auth() # Get your stats by arena, class, or deck stats = trackobot.stats(stats_type='decks') stats = trackobot.stats(stats_type='classes') stats = trackobot.stats(stats_type='arena') # Get supported deck archetypes decks = trackobot.decks() # Reset your account trackobot.reset() # Get game history history = trackobot.history() arena_history = trackobot.arena_history()
In addition to the above, you can upload games, modify game metadata, delete games, or toggle automatic deck tracking. To learn more about the available functionality, please read the docs.
Please ensure you are using your Trackobot password, not your Trackobot API key. You can get your password from the Trackobot desktop app by exporting your user data to a file. Your password will be the second string in the file with spaces between each character. Remove the spaces and you should have a password of length 8.
CLI
Starting with v2.0, there is an included CLI utility for interacting with trackobot.com. It serves as an example of how to use the library as well as a convenient way of getting data quickly. Some people may only need simple functionality from this library, and this utility provides that. It implements all available commands in trackopy. It is installed with the library and can be run with the tb command. See all arguments and functionality with tb --help.
License
This project is licensed under the MIT license. You can read more in the LICENSE file.
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
File details
Details for the file trackopy-2.0.2.tar.gz
.
File metadata
- Download URL: trackopy-2.0.2.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e60f71ffc9ccb4f9669faeec03a3f9c71a3c635f0630569b926881fc9d6db1a |
|
MD5 | cfa60ddb07786d01a10d8a8ec2bf0fc4 |
|
BLAKE2b-256 | 2dc827265b5d227537b1e48ea4140422df80f348b002d492892c031b32d0a5a0 |
File details
Details for the file trackopy-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: trackopy-2.0.2-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8687fc76856c5026cd9be1e44d8ea35c1f770dca929cf49b4b615cd4b037c9a |
|
MD5 | c8e1444812c9507fc4069678ebbcedef |
|
BLAKE2b-256 | 19641ac1632d70e8d7dc2d1973cc931d62c39b1f4232f188090ebc3986e50de7 |