client.notebooks.patch

A method of the Notebooks endpoint.

patch(id: int, *, name: str = None, language: str = None, description: str = None, file_id: str = None, requirements_file_id: str = None, requirements: str = None, docker_image_name: str = None, docker_image_tag: str = None, instance_type: str = None, memory: int = None, cpu: int = None, credentials: List[int] = None, environment_variables: dict = None, idle_timeout: int = None, partition_label: str = None, git_repo_url: str = None, git_ref: str = None, git_path: str = None) Response

Update some attributes of this Notebook

API URL: PATCH /notebooks/{id}

import civis
client = civis.APIClient()
response = client.notebooks.patch(...)
Parameters:
idint

The ID for this notebook.

namestr, optional

The name of this notebook.

languagestr, optional

The kernel language of this notebook (“python3” or “r”). Defaults to “python3”.

descriptionstr, optional

The description of this notebook.

file_idstr, optional

The file ID for the S3 file containing the .ipynb file.

requirements_file_idstr, optional

The file ID for the S3 file containing the requirements.txt file.

requirementsstr, optional

The requirements txt file.

docker_image_namestr, optional

The name of the docker image to pull from DockerHub.

docker_image_tagstr, optional

The tag of the docker image to pull from DockerHub (default: latest).

instance_typestr, optional

The EC2 instance type to deploy to.

memoryint, optional

The amount of memory allocated to the notebook.

cpuint, optional

The amount of cpu allocated to the the notebook.

credentialsList[int], optional

The credentials attached to the notebook. Accepts a list of credential IDs and returns a list of id, name pairs.

environment_variablesdict, optional

Environment variables to be passed into the Notebook.

idle_timeoutint, optional

How long the notebook will stay alive without any kernel activity.

partition_labelstr, optional

The partition label used to run this object.

git_repo_urlstr, optional

The URL of the git repository (e.g., https://github.com/organization/repo_name.git).

git_refstr, optional

The git reference if git repo is specified

git_pathstr, optional

The path to the .ipynb file in the git repo that will be started up on notebook launch

Returns:
civis.Response
  • idint

    The ID for this notebook.

  • namestr

    The name of this notebook.

  • languagestr

    The kernel language of this notebook (“python3” or “r”). Defaults to “python3”.

  • descriptionstr

    The description of this notebook.

  • notebook_urlstr

    Time-limited URL to get the .ipynb file for this notebook.

  • notebook_preview_urlstr

    Time-limited URL to get the .htm preview file for this notebook.

  • requirements_urlstr

    Time-limited URL to get the requirements.txt file for this notebook.

  • file_idstr

    The file ID for the S3 file containing the .ipynb file.

  • requirements_file_idstr

    The file ID for the S3 file containing the requirements.txt file.

  • usercivis.Response
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • docker_image_namestr

    The name of the docker image to pull from DockerHub.

  • docker_image_tagstr

    The tag of the docker image to pull from DockerHub (default: latest).

  • instance_typestr

    The EC2 instance type to deploy to.

  • memoryint

    The amount of memory allocated to the notebook.

  • cpuint

    The amount of cpu allocated to the the notebook.

  • created_at : str (time)

  • updated_at : str (time)

  • most_recent_deploymentcivis.Response
    • deployment_idint

      The ID for this deployment.

    • user_idint

      The ID of the owner.

    • hoststr

      Domain of the deployment.

    • namestr

      Name of the deployment.

    • docker_image_namestr

      The name of the docker image to pull from DockerHub.

    • docker_image_tagstr

      The tag of the docker image to pull from DockerHub (default: latest).

    • display_urlstr

      A signed URL for viewing the deployed item.

    • instance_typestr

      The EC2 instance type requested for the deployment.

    • memoryint

      The memory allocated to the deployment, in MB.

    • cpuint

      The cpu allocated to the deployment, in millicores.

    • statestr

      The state of the deployment. One of pending, running, terminated or sleeping.

    • state_messagestr

      A detailed description of the state.

    • max_memory_usagefloat (float)

      If the deployment has finished, the maximum amount of memory used during the deployment, in MB.

    • max_cpu_usagefloat (float)

      If the deployment has finished, the maximum amount of cpu used during the deployment, in millicores.

    • created_at : str (time)

    • updated_at : str (time)

    • notebook_idint

      The ID of the owning Notebook

  • credentialsList[civis.Response]

    The credentials attached to the notebook. Accepts a list of credential IDs and returns a list of id, name pairs.

    • idint

      The ID of the credential.

    • namestr

      The name of the credential.

  • environment_variablescivis.Response

    Environment variables to be passed into the Notebook.

  • idle_timeoutint

    How long the notebook will stay alive without any kernel activity.

  • partition_labelstr

    The partition label used to run this object.

  • git_repo_idint

    The ID of the git repository.

  • git_repo_urlstr

    The URL of the git repository (e.g., https://github.com/organization/repo_name.git).

  • git_refstr

    The git reference if git repo is specified

  • git_pathstr

    The path to the .ipynb file in the git repo that will be started up on notebook launch

  • my_permission_levelstr

    Your permission level on the object. One of “read”, “write”, or “manage”.

  • archivedbool

    The archival status of the requested item(s).

  • hiddenbool

    The hidden status of the item.