SDK (python)
Labii SDK
SDK is the toolkit with prebuilt Labii components that developers use to interact with Labii APIs. Full documentation available at


  1. 1.
    Install the Labii SDK
pip install labii-sdk
2. Import the package
from labii_sdk.sdk import LabiiObject
3. Initial the API object
labii = LabiiObject()
4. Start querying
# login
# get a list of tables

Initial SDK

During SDK initiation, the following parameters can be customized:
  • base_url, the server base URL, defaults to If you are using a different data center, make sure to change the base_url setting.
  • email and password, the email or password to get authenticated. If no email or password is provided, a pop-up will appear.
  • organization__sid, your organization sid. You can find it by logging into Labii ( and going to Side menu -> Settings -> Organization -> Sid
api = LabiiObject(


Labii objects for interaction. Learn more at
  • Organization
  • Application
  • Subscription
  • People
  • Team
  • SAML
  • OrganizationWidget
  • Backup
  • Project
  • ProjectMember
  • Table
  • Column
  • Section
  • Filter
  • Record
  • Cell
  • Version
  • Visitor
  • Activity
  • Workflow
  • Step
  • Widget


A list of methods for interacting with objects.


Create a object.
# Create a project
labii.Project.create({name="test", ...})
# Create a table
labii.Table.create({name_singular="test", ...})
# Create a row
labii.Record.create{{name="test", ...}, query="table__sid=xxx"}


Return a object
  • sid, the sid of the object
  • query (optional), additional query to limit the results.
# Return a project
# Return a record


Get a list of objects
  • page (default=1), the page number to return.
  • page_size (default=10), the number of items to be paginated.
  • all_pages (bool, default=False), Whether all pages should be returned. When False, only return the data for the first page. Only applies to list views.
  • level (default to "organization"), the scope of records to retrieve. Learn more at
  • serializer (default to "list"), the scope of fields of the return data. Learn more at
    • name, return only sid and name, very fast
    • list, return selected fields of the objects, fast
    • detail, return all fields of the objects, slow
  • query (optional), additional query to limit the results.
# Return first page of experiment records
# Return list of projects


Edit an object
  • sid, the sid of the object
  • data (dict), a JSON dict data to post. Learn more at
  • query (optional), additional query to limit the results.
# modify the name of a project
data={"name": "new name"}


Remove an object
  • sid, the sid of the object
  • query (optional), additional query to limit the results.
Not all objects can be deleted. A 405 error will be displayed if an object cannot be deleted.
# remove the permission of a user


Upload the content of a file.
  • sid, the sid of the file record
  • filename , the file name with full path.
A file record should be created first
# create a file record
response = labii.Record.create(
"name": "test.txt"
query="table__sid=[file table sid]"
# upload the file content
file_record = labii.Record.upload(response["sid"], "/tmp/test.txt")


You can use this function to watch a particular folder. As soon as the file(s) are present, the function will upload each file to Labii and move the file to the "uploaded" subfolder. This function allows you to upload files generated by a machine/equipment automatically.
Version 1.9 or later is required to use this function.
  • folder_path, optional, the folder (including the path) to watch. default to current path.
  • project__sids, optional, list of project sids. Files will be uploaded to these projects if they are defined. When the sids are not defined, you will be asked for them.
  • interval, optional, time interval to check the folder, default to 5 seconds.
// Watch a results folder
from labii_sdk.sdk import LabiiObject
labii = LabiiObject(organization__sid="xxx") # do not forgot to provide the base_url if not us data center
labii.api.login(email="xxx", password="xxx")
labii.Record.watch_folder(folder_path="./results", project__sids="xxx")