Projects Client

Importing

from gradient import ProjectsClient
api_key='YOUR_API_KEY'

projects_client = ProjectsClient(api_key)

Creating Projects

project_id = projects_client.create('your-project-name')
print("project_id: "+project_id)
project_id: prg8149k1

This returns the project ID of the newly created project. Saving this is useful to pass in as input or filter for other queries you make.

Listing Projects

projects_list = projects_client.list()
for project in project_list:
       print("project_id: "+project.id +" project_name: "+ project.name)   
project_id: prg8149k1 project_name: 'your-project-name'

Projects Object

Getting Help

If you are ever stuck, you can call help on any ProjectsClient object or function

Last updated