Learn how to change the status of a Project using Encord’s Python SDK.
ProjectStatus
.
You can change a Project’s status to any of the following:
NOT_STARTED
IN_PROGRESS
PAUSED
COMPLETED
CANCELLED
ARCHIVED
# Import dependencies
from encord import EncordUserClient
from encord.project import ProjectStatus
# User input
SSH_PATH = "/Users/chris-encord/ssh-private-key.txt" # Specify the file path to your SSH key
PROJECT_ID = "c96d3d2a-eeb0-433e-8298-27513f7e4585" # Specify the unique Project ID for the Project
# Authenticate with Encord
user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
ssh_private_key_path=SSH_PATH,
# For US platform users use "https://api.us.encord.com"
domain="https://api.encord.com",
)
project = user_client.get_project(PROJECT_ID)
print(project.status)
project.set_status(ProjectStatus.COMPLETE) # Specify the Project status change you want to make
project = user_client.get_project(PROJECT_ID)
print(project.status)
Was this page helpful?