Cheat sheet for NEW users

This cheat sheet provides a quick overview of Vectice's 3 simple API calls to help you get started auto-documenting your datasets, models and notes.

Be sure to create your API key first!

Install Vectice

Start by installing the Vectice library.

# Install Vectice latest package
pip install vectice

# Install a specific version of the Vectice package
pip install vectice==<version number>

Connect to Vectice

Get started by connecting to the Vectice API and starting an iteration.

#import and connect to Vectice
import vectice
connect = vectice.connect(api_token="your-api-key") #Paste your API key

# Connect to your project phase using your phase ID
phase = connect.phase("PHA-XXX") #You can fetch the relevant phase ID from your chosen Vectice project in the UI.

#Create an iteration
iteration = phase.create_or_get_current_iteration()

Auto-document your assets

Auto-document your assets to begin documenting your work in the Vectice app.

# Auto-document your first comments or notes
iteration.log("this is a comment")

# Auto-document your first dataset from a local file
clean_dataset = Dataset.clean(name=name, resource=FileResource(paths, dataframes), attachments=attachments)
iteration.log(clean_dataset)

# Auto-document your first model
model = Model(library, technique, metrics, properties, name, attachments, predictor)
iteration.log(model)

Close your iteration

Once you are done logging your assets for an iteration, mark it complete.

# Completes and closes the current iteration once you are happy with it
iteration.complete()

Additional resources