Skip to content

Projects API#

Creation#

[source]

create_project#

hopsworks.create_project(name, description=None, feature_store_topic=None)

Create a new project.

Not supported

This is not supported if you are connected to Serverless Hopsworks

Example for creating a new project

import hopsworks

hopsworks.login(...)

hopsworks.create_project("my_project", description="An example Hopsworks project")

Arguments

  • name str: The name of the project.
  • description str | None: optional description of the project
  • feature_store_topic str | None: optional feature store topic name

Returns

Project. The Project object to perform operations on


Properties#

[source]

created#

Timestamp when the project was created


[source]

description#

Description of the project


[source]

id#

Id of the project


[source]

name#

Name of the project


[source]

owner#

Owner of the project


[source]

project_namespace#

Kubernetes namespace used by project


Methods#

[source]

get_dataset_api#

Project.get_dataset_api()

Get the dataset api for the project.

Returns

DatasetApi: The Datasets Api handle


[source]

get_environment_api#

Project.get_environment_api()

Get the Python environment AP

Returns

EnvironmentApi: The Python Environment Api handle


[source]

get_feature_store#

Project.get_feature_store(name=None, engine=None)

Connect to Project's Feature Store.

Defaulting to the project name of default feature store. To get a shared feature store, the project name of the feature store is required.

Example for getting the Feature Store API of a project

import hopsworks

project = hopsworks.login()

fs = project.get_feature_store()

Arguments

  • name str | None: Project name of the feature store.
  • engine str | None: Which engine to use, "spark", "python" or "training". Defaults to "python" when connected to Serverless Hopsworks. See hopsworks.connection documentation for more information.

Returns

hsfs.feature_store.FeatureStore: The Feature Store API

Raises

  • RestAPIError: If unable to connect

[source]

Project.get_flink_cluster_api()

Get the flink cluster API for the project.

Returns

FlinkClusterApi: The Flink Cluster Api handle


[source]

get_git_api#

Project.get_git_api()

Get the git repository api for the project.

Returns

GitApi: The Git Api handle


[source]

get_job_api#

Project.get_job_api()

Get the job API for the project.

Returns

JobApi: The Job Api handle


[source]

get_jobs_api#

Project.get_jobs_api()

Deprecated, use get_job_api instead.


[source]

get_kafka_api#

Project.get_kafka_api()

Get the kafka api for the project.

Returns

KafkaApi: The Kafka Api handle


[source]

get_model_registry#

Project.get_model_registry()

Connect to Project's Model Registry API.

Example for getting the Model Registry API of a project

import hopsworks

project = hopsworks.login()

mr = project.get_model_registry()

Returns

hsml.model_registry.ModelRegistry: The Model Registry API

Raises

  • RestAPIError: If unable to connect

[source]

get_model_serving#

Project.get_model_serving()

Connect to Project's Model Serving API.

Example for getting the Model Serving API of a project

import hopsworks

project = hopsworks.login()

ms = project.get_model_serving()

Returns

hsml.model_serving.ModelServing: The Model Serving API

Raises

  • RestAPIError: If unable to connect

[source]

get_opensearch_api#

Project.get_opensearch_api()

Get the opensearch api for the project.

Returns

OpenSearchApi: The OpenSearch Api handle


[source]

get_url#

Project.get_url()