Introduction
Hybrid & On-prem
Hybrid cloud
Cloud data overview
Restrict data access by IP range
How to generate signed URLs
How to generate non-expiring signed URLs
On-prem
App
Overview
Ontology management
Projects
Data import
Labeling guides
Label export
Members
Workforce
Quality assurance
Automation
Model-assisted labeling
MAL import formats
Webhooks setup
Queue system
Real-time human-in-the-loop labeling
Custom label interface
Images
Videos
Text
Geospatial data
Python SDK
Getting started
Creating your first project
Project setup script
Projects
Datasets
Data Rows
Import annotations
Labels
General concepts
Python SDK FAQ
API reference
Model-assisted labeling Python script
GraphQL API
Intro to the GraphQL API
Getting started
Data types overview
Ontologies
Datasets
Data Rows
Bulk import requests
Labeling parameters
Labels
Members
Attachments
Review queue
Webhooks
Legacy editor
Migration guide
Legacy vs new editor ontology
Legacy vs new editor JSON exports
Legacy vs new editor hotkeys
Model predictions (legacy)
Multistep labeling
Release notes
Release definitions
January 6, 2021
December 7, 2020
November 4, 2020
October 9, 2020
September 25, 2020
August 21, 2020
August 6, 2020
July 6, 2020
June 22, 2020
June 2, 2020
May 19, 2020
April 14, 2020
April 1, 2020
March 3, 2020
February 18, 2020
February 5, 2020
January 17, 2020
Terms of use
Table of Contents
- All Categories
- Python SDK
- Projects
Projects
Updated
by Alex Cota
Below are some frequently used methods for Projects. For a complete list of methods see the API reference.
A Project contains all labeling and reviewing work for a set of data.
Before you start
Complete the installation and authentication steps.
Make sure the API client is initialized:
from labelbox import Client
client = Client()
Create a Project
Use the create_project
method to create and name your Project.
project = client.create_project(name="<project_name>")
Where:
name
is the name you give your project.
Fetch a Project
Use the get_project
method to fetch a single Project.
project = client.get_project("<project_id>")
print(project)
Fetch multiple Projects
There are three ways to fetch multiple Projects.
a. Fetch all projects.
for project in client.get_projects():
print(project.name, project.uid)
b. Pass a where
parameter with a standard comparison operator (==, !=, >, >=, <, <=). Then, iterate over the PaginatedCollection
object.
PaginatedCollection
objects, see our docs Pagination.from labelbox import Project
projects_x = client.get_projects(where=Project.name == "<project_name>")
for x in projects_x:
print(x)
Or you can use the this code to get your desired object which will raise an error if there is not at least one item in the collection.
item = next(iter(projects_x))
print(item)
For more information on pagination, see General concepts.
c. Specify a Project by combining comparisons using logical expressions. Currently, the where
clause supports the logical AND operator.
from labelbox import Project
projects = client.get_projects(where=(Project.name == "<project_name>") & (Project.description == "<project_description>"))
for x in projects:
print(x)
Update a Project field
Use the update
method to target and modify any updatable value for Project. For a complete list of updatable and non-updatable fields in the Project object, see the API reference.
project = client.get_project("<project_id>")
project.update(name="<new_project_name>", description="<new_description>")