Skip to content

Use a project

The Project object is the working context for project state, related entities, and project-level operations.

Persist and refresh

update

Update entity into backend.

Returns:

Type Description
Project

Entity updated.

export

Export object as a YAML file in the context folder. If the objects are not embedded, the objects are exported as a YAML file.

Returns:

Type Description
str

Exported filepath.

refresh

Refresh object from backend.

Returns:

Type Description
Project

Project object.

The Project object exposes project-bound shortcuts for the entities it contains, so the project name is inferred from the object. See Entities for the available entity types.

artifact = project.get_artifact("my-artifact")
model = project.log_model(source="models/my-model", name="my-model")
functions = project.list_functions()

Entity collections are also available through the artifacts, dataitems, models, functions, and workflows properties.

Run project operations

Use these methods to execute workflows, search project entities, and manage access.

share

Share project.

Parameters:

Name Type Description Default
user str

User to share project with.

required

Returns:

Type Description
None
unshare

Unshare project.

Parameters:

Name Type Description Default
user str

User to unshare project with.

required

Returns:

Type Description
None
search_entity

Search objects from backend.

See also

digitalhub.search_entity

run

Run workflow project.

Parameters:

Name Type Description Default
workflow str

Workflow name.

None
**kwargs dict

Keyword arguments passed to workflow.run().

{}

Returns:

Type Description
Run

Run instance.