Create and delete projects
You can not only log and query ML metadata using Neptune API but also manage administration including adding and removing members and creating and deleting projects.
This guide will show you how to programmatically:
  • Create a new project
  • Delete an existing project
  • List all the projects you have access to
Keywords: create neptune projects, delete neptune projects, manage neptune projects, manage neptune workspace, neptune-client, neptune api

Before you start

Make sure you meet the following prerequisites before starting:
You can run this how-to on Google Colab with zero setup. Just click on the Run in Google Colab link on the top of the page.

Step 1: Create project

Use create_project function to create a Neptune project in your workspace:
1
from neptune import management
2
3
management.create_project(name='<WORKSPACE/PROJECT>',
4
key='AMA',
5
api_token='<YOUR_API_TOKEN>',
6
visibility='pub')
Copied!
Create a project with Neptune API
Remember to:
  • key you choose needs to be unique in your workspace
  • make sure to choose the visibility level PRIVATE for the projects you don't want to share with the world.

Step 2: List all your projects

Get a list of all the projects you have access to with get_project_list function:
1
management.get_project_list(api_token='<YOUR_API_TOKEN>')
Copied!
List of projects with Neptune API

Step 3: Delete project

Delete the project you have just created with the delete_project function:
1
management.delete_project(name='<WORKSPACE/PROJECT>',
2
api_token='<YOUR_API_TOKEN>')
Copied!

Summary

In this guide, you learned how to use Neptune API to:
  • Create a project with create_project
  • Delete a project with delete_project
  • List all projects you have access to with get_project_list

See also

Last modified 28d ago