Skip to main content
Version: 1.2.0

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", secret=False, locked=None)

If the secret argument is set to True, the project is visible only to its owner. Other users in the system cannot see the project in the output of the list projects call and can not view the project details.

If the locked argument is set to True, only users with consumer permission can list and get feature sets from this project. If this parameter is provided, the default value provided by the backend is used.

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

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:

- locked
- secret
- description
- custom_data

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

project.secret = False

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