SDK version deprecation
SDK versions earlier than 3.68 are no longer supported. Please update to a supported version to maintain compatibility.Installation
To install, run eitherpip install labelbox
orpip install "labelbox[data]"
in your command line.
Module | Description |
---|---|
"labelbox[data]" | Installs all required dependencies (libraries, tools to manipulate annotations, and more.) |
labelbox | Installs all required libraries for client-only functionality |
How to use our Developer Guides
Our developer documentation is designed to help you understand the different methods in the Labelbox-Python SDK. You are encouraged to run the code blocks locally as you read through the guides. Some guides include links to Google Colab Notebooks and our GitHub repository at the top of the page. These links allow you to run Python code quickly, demonstrating how specific methods work and providing example workflows.Best Practices
To get the best experience from the SDK, we recommend the following:-
Always use bulk operations. Unless you are testing or working on small datasets, use bulk operations for faster and more reliable performance.
-
create_data_rows
instead ofcreate_data_row
-
project.export()
instead ofproject.labels()
-
Label.bulk_delete(labels)
instead of[label.delete() for label in labels]
-
-
Use
get_one()
andget_many()
methods to get elements of a paginated collection instead oflist
.list(dataset.data_rows())[0]
is going to query for every singledata_row
in your dataset.
-
Make sure to use the latest version of the SDK.
- Labelbox is a rapidly evolving company, and we are constantly adding new features and optimizations.