Govern Blueprints and Blueprint versions

Blueprint versions are templates describing the items in Dataiku Govern. Several blueprint versions are gathered within the same Blueprint which holds a logical concept. Note: to learn more about them, go to the Dataiku Govern definitions page.

List all blueprints

import dataikuapi

host = "http(s)://DSS_HOST:DSS_PORT"
apiKey = "Your API key secret"
client = dataikuapi.GovernClient(host, apiKey)

# List the blueprints for which the API key has access
client.list_blueprints()

Reference API doc

class dataikuapi.govern.blueprint.GovernBlueprintListItem(client, data)

An item in a list of blueprints. Do not create this directly, use list_blueprints()

get_raw()

Get the raw content of the blueprint list item

Returns

the raw content of the blueprint list item as a dict

Return type

dict

to_blueprint()

Gets the GovernBlueprint corresponding to this blueprint object

Returns

the blueprint object

Return type

a GovernBlueprint

class dataikuapi.govern.blueprint.GovernBlueprint(client, blueprint_id)

A handle to read a blueprint on the Govern instance. If you wish to edit blueprints or the blueprint versions, use the blueprint designer object GovernAdminBlueprintDesigner. Do not create this directly, use get_blueprint()

get_definition()

Return the definition of the blueprint as an object.

Returns

The blueprint definition as an object.

Return type

GovernBlueprintDefinition

list_versions()

List versions of this blueprint.

Returns

the list of blueprint versions

Return type

list of GovernBlueprintVersionListItem

get_version(version_id)

Return a handle to interact with a blueprint version

Parameters

version_id (str) – ID of the version

Return type

GovernBlueprintVersion

class dataikuapi.govern.blueprint.GovernBlueprintDefinition(client, blueprint_id, definition)

The definition of a blueprint. Do not create this class directly, instead use get_definition()

get_raw()

Get raw definition of a blueprint

Returns

The raw definition of blueprint, as a dict.

Return type

dict

class dataikuapi.govern.blueprint.GovernBlueprintVersionListItem(client, blueprint_id, data)

An item in a list of blueprint versions. Do not create this directly, use list_versions()

get_raw()

Get the raw content of the blueprint version list item

Returns

the raw content of the blueprint version list item as a dict

Return type

dict

to_blueprint_version()

Gets the GovernBlueprintVersion corresponding to this blueprint version object

Returns

the blueprint object

Return type

a GovernBlueprintVersion

class dataikuapi.govern.blueprint.GovernBlueprintVersion(client, blueprint_id, version_id)

A handle to interact with a blueprint version on the Govern instance. Do not create this directly, use get_version()

get_blueprint()

Retrieve the blueprint handle of this blueprint version.

Returns

the corresponding blueprint handle

Return type

GovernBlueprint

get_trace()

Get the trace of this blueprint version (info about its status and origin blueprint version lineage).

Returns

The trace of this blueprint version.

Return type

GovernBlueprintVersionTrace

get_definition()

Get the definition of this blueprint version.

Returns

The definition of the blueprint version as an object.

Return type

GovernBlueprintVersionDefinition

class dataikuapi.govern.blueprint.GovernBlueprintVersionTrace(client, blueprint_id, version_id, trace)

The trace of a blueprint version containing information about its lineage and its status. Do not create this directly, use get_trace()

get_raw()

Get raw trace of the blueprint version.

Returns

The raw trace of blueprint version, as a dict.

Return type

dict

property status

Get the status of the blueprint version among (DRAFT, ACTIVE, or ARCHIVED)

Return type

str

property origin_version_id

Get the origin version ID of this blueprint version

Return type

str

class dataikuapi.govern.blueprint.GovernBlueprintVersionDefinition(client, blueprint_id, version_id, definition)

The definition of a blueprint version. Do not create this directly, use get_definition()

get_raw()

Get raw definition of the blueprint version.

Returns

The raw definition of blueprint version, as a dict.

Return type

dict