Projects API
Listing projects
To list all projects, call:
- Python
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:
- Python
client.projects.get("..").list()
however this only lists feature sets in that specific project. To list feature sets across multiple projects, run:
- Python
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.
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:
- Python
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:
- Python
project = client.projects.get("project")
Remove a project
To remove the project, call:
- Python
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:
- Python
- description
- custom_data
To update the field, simply call the setter of that field. For example, to update the description, call:
- Python
project.description = "Better description"
To retrospectively find out who and when updated project, call:
- Python
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.
The list method does not return users directly. Instead, it returns an iterator which obtains the users lazily.
- Python
# 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.
- Python
project.open_website()
- Submit and view feedback for this page
- Send feedback about H2O Feature Store to cloud-feedback@h2o.ai