Skip to main content
App version: 3.4.14

create_project()

Python package: neptune-scale

Creates a project in a given Neptune workspace.

Parameters

name
str
required
default: None

Name of a project in the form workspace-name/project-name. If None, the value of the NEPTUNE_PROJECT environment variable is used.

  • Must consist of 3–128 characters.
  • Can include any ASCII-encoded characters, except /, \, #, ?, %, :, and 4-byte UTF characters.

workspace
str
optional
default: None

Name of your Neptune workspace. You can omit this argument if you include the workspace name in the name argument.

visibility
"priv" | "pub" | "workspace"
required
default: "priv"

Level of privacy for the project:

  • If "priv", only workspace members assigned to the project can access it (requires a subscription plan with access control).
  • If "pub", the project is freely accessible to anyone on the internet.
  • If "workspace", all workspace members can access it as owners.
description
str
optional
default: None

Description of the project.

key
str
optional
default: None

Project identifier. Must contain 1–10 upper case letters or numbers (at least one letter). For example, "PX2". If you leave it out, Neptune generates a project key for you.

fail_if_exists
bool
optional
default: False

If the project already exists and this flag is set to True, an error is raised.

api_token
str
optional
default: None

Account's Neptune API token. If not provided, the value of the NEPTUNE_API_TOKEN environment variable is used. We recommend saving credentials as environment variables.

Returns

The name of the created project.

Examples

from neptune_scale.projects import create_project

create_project(
name="project-x",
workspace="team-alpha", # a workspace with this name must already exist
)

You can also pass the project path as a single argument, in the form workspace-name/project-name:

create_project(name="team-alpha/project-x")

More options:

create_project(
name="sandbox",
workspace="team-alpha", # a workspace with this name must already exist
visibility="workspace",
description="Sandbox project for testing purposes."
fail_if_exists=True,
api_token="h0dHBzOi8aHR0cHM6...Y2MifQ==",
)