client.notebooks.list

A method of the Notebooks endpoint.

list(*, hidden: bool = None, archived: str = None, author: str = None, status: str = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse

List Notebooks

API URL: GET /notebooks

import civis
client = civis.APIClient()
response = client.notebooks.list(...)
Parameters:
hiddenbool, optional

If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.

archivedstr, optional

The archival status of the items to return. One of: true, false, all. A blank value is read as ‘false’, which is also the default.

authorstr, optional

If specified, return items from any of these authors. It accepts a comma- separated list of user IDs.

statusstr, optional

If specified, returns notebooks with one of these statuses. It accepts a comma-separated list, possible values are ‘running’, ‘pending’, ‘idle’.

limitint, optional

Number of results to return. Defaults to 20. Maximum allowed is 50.

page_numint, optional

Page number of the results to return. Defaults to the first page, 1.

orderstr, optional

The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, name, created_at.

order_dirstr, optional

Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.

iteratorbool, optional

If True, return a generator (specifically, a civis.PaginatedResponse object) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return a civis.ListResponse object (= a list of civis.Response objects), whose size is determined by ‘limit’. Defaults to False.

Returns:
civis.ListResponse | civis.PaginatedResponse
  • 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.

  • 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.

  • 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).

    • 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

  • archivedbool

    The archival status of the requested item(s).