Skip to main content
Version: v2.0.2

Projects API

Listing projects

To list all projects, call:

client.projects.list()

This method returns a Python generator which can be used to lazily iterate over all projects.

Listing feature sets across multiple projects

Each project entity allows you to list projects in it as:

client.projects.get("..").list()

however this only lists feature sets in that specific project. To list feature sets across multiple projects, run:

client.projects.list_feature_sets(["project_name_A", "project_name_B"])

The single argument of this method is always an array containing the names of projects in which to perform the feature set search.

note

The list method does not return feature sets directly, but instead returns an iterator which obtains the feature sets lazily.

Create a project

To create a project, call:

project = client.projects.create(project_name="project", description="description", access_modifier=AccessModifier.PUBLIC)

To see naming conventions for project names, visit Default naming rules.

Project Access Modifier

AccessModifier can be passed when creating a project or during updating a project. Available values are:

  • Public - means that every user in the system can see this project and feature sets within the project.
  • ProjectOnly - means that every user can see the project, but only users with viewer permission can see feature sets within this project.
  • Private - means that only owner and users the owner gave permission to can access this project and feature sets within.

Default value is AccessModifier.PRIVATE.

Get an existing project

To get an existing project, call:

project = client.projects.get("project")

Remove a project

To remove the project, call:

project.delete()

This will remove all feature sets and features stored inside this project.

Update project fields

The following fields are modifiable on the project api:

- description
- custom_data

To update the field, simply call the setter of that field. For example, to update the description, call:

project.description = "Better description"

To retrospectively find out who and when updated project, call:

project.last_updated_by
project.last_updated_date_time

To see how to set permissions on projects, visit Authentication.

Listing project users

From project owner's perspective, it may be needed to understand who is actually allowed to access and modify the given project. Therefore, there are convenience methods to list project users according to their rights. Each of these methods returns list of users that have specified or higher rights, their actual access rights and a resource type specifying, where the access right permission comes from.

note

The list method does not return users directly. Instead, it returns an iterator which obtains the users lazily.

# listing users by access rights
project = client.projects.get("training_project")
owners = project.list_owners()
editors = project.list_editors()
sensitive_consumers = project.list_sensitive_consumers()
consumers = project.list_consumers()
viewers = project.list_viewers()

# accessing returned element
owner = next(owners)
owner.user
owner.access_type
owner.resource_type

Open project in Web UI

This method opens the given project in Feature Store Web UI.

project.open_website()

Feedback