Jupyter Server API
Project description
Jupyter NB Server Python Client
An SDK and API-wrapper for the jupyter notebook REST API.
- API version: 5
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://jupyter.org
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import nbserv_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import nbserv_client
Tests
Execute pytest
to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import time
import nbserv_client
from nbserv_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = nbserv_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with nbserv_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = nbserv_client.ApiSpecApi(api_client)
try:
# Get the current spec for the notebook server's APIs.
api_response = api_instance.api_spec_yaml_get()
print("The response of ApiSpecApi->api_spec_yaml_get:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ApiSpecApi->api_spec_yaml_get: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
ApiSpecApi | api_spec_yaml_get | GET /api/spec.yaml | Get the current spec for the notebook server's APIs. |
ConfigApi | api_config_section_name_get | GET /api/config/{section_name} | Get a configuration section by name |
ConfigApi | api_config_section_name_patch | PATCH /api/config/{section_name} | Update a configuration section by name |
ContentsApi | api_contents_path_checkpoints_checkpoint_id_delete | DELETE /api/contents/{path}/checkpoints/{checkpoint_id} | Delete a checkpoint |
ContentsApi | api_contents_path_checkpoints_checkpoint_id_post | POST /api/contents/{path}/checkpoints/{checkpoint_id} | Restore a file to a particular checkpointed state |
ContentsApi | api_contents_path_checkpoints_get | GET /api/contents/{path}/checkpoints | Get a list of checkpoints for a file |
ContentsApi | api_contents_path_checkpoints_post | POST /api/contents/{path}/checkpoints | Create a new checkpoint for a file |
ContentsApi | api_contents_path_delete | DELETE /api/contents/{path} | Delete a file in the given path |
ContentsApi | api_contents_path_get | GET /api/contents/{path} | Get contents of file or directory |
ContentsApi | api_contents_path_patch | PATCH /api/contents/{path} | Rename a file or directory without re-uploading content |
ContentsApi | api_contents_path_post | POST /api/contents/{path} | Create a new file in the specified path |
ContentsApi | api_contents_path_put | PUT /api/contents/{path} | Save or upload file. |
DefaultApi | api_get | GET /api/ | Get the Jupyter Server version |
IdentityApi | api_me_get | GET /api/me | Get the identity of the currently authenticated user. If present, a `permissions` argument may be specified to check what actions the user currently is authorized to take. |
KernelsApi | api_kernels_get | GET /api/kernels | List the JSON data for all kernels that are currently running |
KernelsApi | api_kernels_kernel_id_delete | DELETE /api/kernels/{kernel_id} | Kill a kernel and delete the kernel id |
KernelsApi | api_kernels_kernel_id_get | GET /api/kernels/{kernel_id} | Get kernel information |
KernelsApi | api_kernels_kernel_id_interrupt_post | POST /api/kernels/{kernel_id}/interrupt | Interrupt a kernel |
KernelsApi | api_kernels_kernel_id_restart_post | POST /api/kernels/{kernel_id}/restart | Restart a kernel |
KernelsApi | api_kernels_post | POST /api/kernels | Start a kernel and return the uuid |
KernelspecsApi | api_kernelspecs_get | GET /api/kernelspecs | Get kernel specs |
SessionsApi | api_sessions_get | GET /api/sessions | List available sessions |
SessionsApi | api_sessions_post | POST /api/sessions | Create a new session, or return an existing session if a session of the same name already exists |
SessionsApi | api_sessions_session_delete | DELETE /api/sessions/{session} | Delete a session |
SessionsApi | api_sessions_session_get | GET /api/sessions/{session} | Get session |
SessionsApi | api_sessions_session_patch | PATCH /api/sessions/{session} | This can be used to rename the session. |
StatusApi | api_status_get | GET /api/status | Get the current status/activity of the server. |
TerminalsApi | api_terminals_get | GET /api/terminals | Get available terminals |
TerminalsApi | api_terminals_post | POST /api/terminals | Create a new terminal |
TerminalsApi | api_terminals_terminal_id_delete | DELETE /api/terminals/{terminal_id} | Delete a terminal session corresponding to an id. |
TerminalsApi | api_terminals_terminal_id_get | GET /api/terminals/{terminal_id} | Get a terminal session corresponding to an id. |
Documentation For Models
- APIStatus
- ApiContentsPathGet400Response
- ApiContentsPathPostRequest
- ApiContentsPathPutRequest
- ApiGet200Response
- ApiKernelsPostRequest
- ApiKernelspecsGet200Response
- ApiMeGet200Response
- ApiSessionsPost501Response
- Checkpoints
- Contents
- Identity
- Kernel
- KernelSpec
- KernelSpecFile
- KernelSpecFileHelpLinksInner
- KernelSpecResources
- Session
- Terminal
Documentation For Authorization
Endpoints do not require authorization.
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nbserv_client-1.5.0.tar.gz
.
File metadata
- Download URL: nbserv_client-1.5.0.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 530c666395b06066e647f44bbfb271f57864a8209eb6defb20a6d96050d395b2 |
|
MD5 | ddd890bd414ad743e7909c8bd8003db9 |
|
BLAKE2b-256 | 7cee57f9853da89c2ae69e2f523c295cc99fa8e809c6dc6cc97c80babe66c56e |
File details
Details for the file nbserv_client-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: nbserv_client-1.5.0-py3-none-any.whl
- Upload date:
- Size: 69.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 622af142ff45fd1aeba95671ed976bb59c5b9565abda54f0a75b743f983cd723 |
|
MD5 | f25638746d5e2772bbfe624d3c636b3b |
|
BLAKE2b-256 | 732255912d6964d0b976f381191766d6ecb0d9cc8aa4d3666464bfc45a2900b2 |