pip install basset-python-client
Creating new instance
from basset_client.basset import Basset basset = Basset(basset_token, static_dir, basset_url, base_url)
basset_token<string> - can be found within your project configuration in basset.
static_dir<string> - relative path to the directory containing assets (images, css files)
basset_url<string> - the URL for where basset is hosted eg:
base_url<string> - OPTIONAL - the base url used to create a relative path if the static directory is different that what is used in your snapshots. eg: static files are
static/assetsbut they are referenced as
Start a build
basset.upload_snapshot_file(snapshot, file_path); # or basset.upload_snapshot_source(snapshot, source); ## snapshot is a tuple of strings snapshot = [ widths, title, browsers, selectors, hide_selectors, ]
- snapshot<tuple> - the snapshot represented a tuple of strings
- file_path<string> - the path to the snapshot file (if it was saved to disk)
- source<string> - a string containing the snapshot.
Finishing the build