Getting Started

On This Page

These instructions are for an admin user that has an access-key for the control-plane.

Install the IGZ-Mgmt SDK

Prerequisite: python 3.7 and higher.

!pip install igz-mgmt
# Initialize
import igz_mgmt
# Create a control plane client
client = igz_mgmt.Client(access_key="your-access-id")

See details about the access key in Create a control plane client.

Create a user

This example creates an admin user with default policies of developer and application_read_only.

To set different policies, override the create arg - assigned_policies with any default of igz_mgmt.TenantManagementRoles enum.

new_user = igz_mgmt.User.create(
    client,
    username="admin",
    password="rePlaceme12@!",
    email="user@iguazio.com",
    first_name="igz-sdk",
    last_name="test",
)
print(new_user.id)

Create a Jupyter service

This example creates a Jupyter service owned by the admin user.

jupyter_app_service = igz_mgmt.AppServiceSpec(
    name="jupyter-sdk-test",
    owner="admin",
    description="my-description",
    jupyter=igz_mgmt.JupyterSpec(),
)
igz_mgmt.AppServices.create_or_update(client, jupyter_app_service)

Verify that the service was created:

print(jupyter_app_service.description)