Overview of concepts used throughout Labelbox-Python SDK.
Project
and Dataset
, for example, among others throughout the documentation.
project.name
). Unlike relationships, fields are cached.
In this example, client.get_projects()
returns a PaginatedCollection
object. You can iterate through the PaginatedCollection
object and specify the fields you want to be returned in the fetch. To fetch multiple fields from an object, you must separate them by commas.
DbObject.update()
method to pass the field and the new value. Each data update that usesDbObject.update()
on the client side immediately performs the same update on the server side. If the client-side update does not raise an exception, you can assume the update was successfully passed on the server side.
This example uses theproject.update()
method to change a project’s name and description.
get_datasets
method with a where
parameter with a comparison operator to filter. Any of the standard comparison operators (==
, !=
, >
, =>
, <
, <=
) will work. The get_datasets
method will give you a PaginatedCollection
. You can iterate over the PaginatedCollection
to get your dataset.
where
clause supports the logical AND operator.
PaginatedCollection
instead.
client.get_projects()
, and the relationship call, project.batches()
, a PaginatedCollection
object is returned. This PaginatedCollection
object takes care of the paginated fetching.PaginatedCollection
object is created.
PaginatedCollection
. In this code block, that happens when a list
is initialized with a PaginatedCollection
, and when a PaginatedCollection
is iterated over in a for-loop.
PaginatedCollection
into a list. This will cause all objects in that collection to be fetched from the server.
In cases when you need only some objects, you can use two convenient methods: get_one()
and get_many(n)
.