# 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](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:
```sh
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:
```python
import nbserv_client
```
### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import nbserv_client
```
### Tests
Execute `pytest` to run the tests.
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
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**](docs/ApiSpecApi.md#api_spec_yaml_get) | **GET** /api/spec.yaml | Get the current spec for the notebook server's APIs.
*ConfigApi* | [**api_config_section_name_get**](docs/ConfigApi.md#api_config_section_name_get) | **GET** /api/config/{section_name} | Get a configuration section by name
*ConfigApi* | [**api_config_section_name_patch**](docs/ConfigApi.md#api_config_section_name_patch) | **PATCH** /api/config/{section_name} | Update a configuration section by name
*ContentsApi* | [**api_contents_path_checkpoints_checkpoint_id_delete**](docs/ContentsApi.md#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**](docs/ContentsApi.md#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**](docs/ContentsApi.md#api_contents_path_checkpoints_get) | **GET** /api/contents/{path}/checkpoints | Get a list of checkpoints for a file
*ContentsApi* | [**api_contents_path_checkpoints_post**](docs/ContentsApi.md#api_contents_path_checkpoints_post) | **POST** /api/contents/{path}/checkpoints | Create a new checkpoint for a file
*ContentsApi* | [**api_contents_path_delete**](docs/ContentsApi.md#api_contents_path_delete) | **DELETE** /api/contents/{path} | Delete a file in the given path
*ContentsApi* | [**api_contents_path_get**](docs/ContentsApi.md#api_contents_path_get) | **GET** /api/contents/{path} | Get contents of file or directory
*ContentsApi* | [**api_contents_path_patch**](docs/ContentsApi.md#api_contents_path_patch) | **PATCH** /api/contents/{path} | Rename a file or directory without re-uploading content
*ContentsApi* | [**api_contents_path_post**](docs/ContentsApi.md#api_contents_path_post) | **POST** /api/contents/{path} | Create a new file in the specified path
*ContentsApi* | [**api_contents_path_put**](docs/ContentsApi.md#api_contents_path_put) | **PUT** /api/contents/{path} | Save or upload file.
*DefaultApi* | [**api_get**](docs/DefaultApi.md#api_get) | **GET** /api/ | Get the Jupyter Server version
*IdentityApi* | [**api_me_get**](docs/IdentityApi.md#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**](docs/KernelsApi.md#api_kernels_get) | **GET** /api/kernels | List the JSON data for all kernels that are currently running
*KernelsApi* | [**api_kernels_kernel_id_delete**](docs/KernelsApi.md#api_kernels_kernel_id_delete) | **DELETE** /api/kernels/{kernel_id} | Kill a kernel and delete the kernel id
*KernelsApi* | [**api_kernels_kernel_id_get**](docs/KernelsApi.md#api_kernels_kernel_id_get) | **GET** /api/kernels/{kernel_id} | Get kernel information
*KernelsApi* | [**api_kernels_kernel_id_interrupt_post**](docs/KernelsApi.md#api_kernels_kernel_id_interrupt_post) | **POST** /api/kernels/{kernel_id}/interrupt | Interrupt a kernel
*KernelsApi* | [**api_kernels_kernel_id_restart_post**](docs/KernelsApi.md#api_kernels_kernel_id_restart_post) | **POST** /api/kernels/{kernel_id}/restart | Restart a kernel
*KernelsApi* | [**api_kernels_post**](docs/KernelsApi.md#api_kernels_post) | **POST** /api/kernels | Start a kernel and return the uuid
*KernelspecsApi* | [**api_kernelspecs_get**](docs/KernelspecsApi.md#api_kernelspecs_get) | **GET** /api/kernelspecs | Get kernel specs
*SessionsApi* | [**api_sessions_get**](docs/SessionsApi.md#api_sessions_get) | **GET** /api/sessions | List available sessions
*SessionsApi* | [**api_sessions_post**](docs/SessionsApi.md#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**](docs/SessionsApi.md#api_sessions_session_delete) | **DELETE** /api/sessions/{session} | Delete a session
*SessionsApi* | [**api_sessions_session_get**](docs/SessionsApi.md#api_sessions_session_get) | **GET** /api/sessions/{session} | Get session
*SessionsApi* | [**api_sessions_session_patch**](docs/SessionsApi.md#api_sessions_session_patch) | **PATCH** /api/sessions/{session} | This can be used to rename the session.
*StatusApi* | [**api_status_get**](docs/StatusApi.md#api_status_get) | **GET** /api/status | Get the current status/activity of the server.
*TerminalsApi* | [**api_terminals_get**](docs/TerminalsApi.md#api_terminals_get) | **GET** /api/terminals | Get available terminals
*TerminalsApi* | [**api_terminals_post**](docs/TerminalsApi.md#api_terminals_post) | **POST** /api/terminals | Create a new terminal
*TerminalsApi* | [**api_terminals_terminal_id_delete**](docs/TerminalsApi.md#api_terminals_terminal_id_delete) | **DELETE** /api/terminals/{terminal_id} | Delete a terminal session corresponding to an id.
*TerminalsApi* | [**api_terminals_terminal_id_get**](docs/TerminalsApi.md#api_terminals_terminal_id_get) | **GET** /api/terminals/{terminal_id} | Get a terminal session corresponding to an id.
## Documentation For Models
- [APIStatus](docs/APIStatus.md)
- [ApiContentsPathGet400Response](docs/ApiContentsPathGet400Response.md)
- [ApiContentsPathPostRequest](docs/ApiContentsPathPostRequest.md)
- [ApiContentsPathPutRequest](docs/ApiContentsPathPutRequest.md)
- [ApiGet200Response](docs/ApiGet200Response.md)
- [ApiKernelsPostRequest](docs/ApiKernelsPostRequest.md)
- [ApiKernelspecsGet200Response](docs/ApiKernelspecsGet200Response.md)
- [ApiMeGet200Response](docs/ApiMeGet200Response.md)
- [ApiSessionsPost501Response](docs/ApiSessionsPost501Response.md)
- [Checkpoints](docs/Checkpoints.md)
- [Contents](docs/Contents.md)
- [Identity](docs/Identity.md)
- [Kernel](docs/Kernel.md)
- [KernelSpec](docs/KernelSpec.md)
- [KernelSpecFile](docs/KernelSpecFile.md)
- [KernelSpecFileHelpLinksInner](docs/KernelSpecFileHelpLinksInner.md)
- [KernelSpecResources](docs/KernelSpecResources.md)
- [Session](docs/Session.md)
- [Terminal](docs/Terminal.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Endpoints do not require authorization.
## Author
Raw data
{
"_id": null,
"home_page": "https://github.com/americandatascience/nbserv-client",
"name": "nbserv-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "OpenAPI,OpenAPI-Generator,Jupyter Server API",
"author": "Andrew Chang",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/7c/ee/57f9853da89c2ae69e2f523c295cc99fa8e809c6dc6cc97c80babe66c56e/nbserv_client-1.5.0.tar.gz",
"platform": null,
"description": "# Jupyter NB Server Python Client\n\nAn SDK and API-wrapper for the jupyter notebook REST API.\n\n- API version: 5\n- Package version: 1.0.0\n- Build package: org.openapitools.codegen.languages.PythonClientCodegen\nFor more information, please visit [https://jupyter.org](https://jupyter.org)\n\n## Requirements.\n\nPython 3.7+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git\n```\n(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)\n\nThen import the package:\n```python\nimport nbserv_client\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport nbserv_client\n```\n\n### Tests\n\nExecute `pytest` to run the tests.\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport time\nimport nbserv_client\nfrom nbserv_client.rest import ApiException\nfrom pprint import pprint\n\n# Defining the host is optional and defaults to http://localhost\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = nbserv_client.Configuration(\n host = \"http://localhost\"\n)\n\n\n\n# Enter a context with an instance of the API client\nwith nbserv_client.ApiClient(configuration) as api_client:\n # Create an instance of the API class\n api_instance = nbserv_client.ApiSpecApi(api_client)\n\n try:\n # Get the current spec for the notebook server's APIs.\n api_response = api_instance.api_spec_yaml_get()\n print(\"The response of ApiSpecApi->api_spec_yaml_get:\\n\")\n pprint(api_response)\n except ApiException as e:\n print(\"Exception when calling ApiSpecApi->api_spec_yaml_get: %s\\n\" % e)\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *http://localhost*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*ApiSpecApi* | [**api_spec_yaml_get**](docs/ApiSpecApi.md#api_spec_yaml_get) | **GET** /api/spec.yaml | Get the current spec for the notebook server's APIs.\n*ConfigApi* | [**api_config_section_name_get**](docs/ConfigApi.md#api_config_section_name_get) | **GET** /api/config/{section_name} | Get a configuration section by name\n*ConfigApi* | [**api_config_section_name_patch**](docs/ConfigApi.md#api_config_section_name_patch) | **PATCH** /api/config/{section_name} | Update a configuration section by name\n*ContentsApi* | [**api_contents_path_checkpoints_checkpoint_id_delete**](docs/ContentsApi.md#api_contents_path_checkpoints_checkpoint_id_delete) | **DELETE** /api/contents/{path}/checkpoints/{checkpoint_id} | Delete a checkpoint\n*ContentsApi* | [**api_contents_path_checkpoints_checkpoint_id_post**](docs/ContentsApi.md#api_contents_path_checkpoints_checkpoint_id_post) | **POST** /api/contents/{path}/checkpoints/{checkpoint_id} | Restore a file to a particular checkpointed state\n*ContentsApi* | [**api_contents_path_checkpoints_get**](docs/ContentsApi.md#api_contents_path_checkpoints_get) | **GET** /api/contents/{path}/checkpoints | Get a list of checkpoints for a file\n*ContentsApi* | [**api_contents_path_checkpoints_post**](docs/ContentsApi.md#api_contents_path_checkpoints_post) | **POST** /api/contents/{path}/checkpoints | Create a new checkpoint for a file\n*ContentsApi* | [**api_contents_path_delete**](docs/ContentsApi.md#api_contents_path_delete) | **DELETE** /api/contents/{path} | Delete a file in the given path\n*ContentsApi* | [**api_contents_path_get**](docs/ContentsApi.md#api_contents_path_get) | **GET** /api/contents/{path} | Get contents of file or directory\n*ContentsApi* | [**api_contents_path_patch**](docs/ContentsApi.md#api_contents_path_patch) | **PATCH** /api/contents/{path} | Rename a file or directory without re-uploading content\n*ContentsApi* | [**api_contents_path_post**](docs/ContentsApi.md#api_contents_path_post) | **POST** /api/contents/{path} | Create a new file in the specified path\n*ContentsApi* | [**api_contents_path_put**](docs/ContentsApi.md#api_contents_path_put) | **PUT** /api/contents/{path} | Save or upload file.\n*DefaultApi* | [**api_get**](docs/DefaultApi.md#api_get) | **GET** /api/ | Get the Jupyter Server version\n*IdentityApi* | [**api_me_get**](docs/IdentityApi.md#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. \n*KernelsApi* | [**api_kernels_get**](docs/KernelsApi.md#api_kernels_get) | **GET** /api/kernels | List the JSON data for all kernels that are currently running\n*KernelsApi* | [**api_kernels_kernel_id_delete**](docs/KernelsApi.md#api_kernels_kernel_id_delete) | **DELETE** /api/kernels/{kernel_id} | Kill a kernel and delete the kernel id\n*KernelsApi* | [**api_kernels_kernel_id_get**](docs/KernelsApi.md#api_kernels_kernel_id_get) | **GET** /api/kernels/{kernel_id} | Get kernel information\n*KernelsApi* | [**api_kernels_kernel_id_interrupt_post**](docs/KernelsApi.md#api_kernels_kernel_id_interrupt_post) | **POST** /api/kernels/{kernel_id}/interrupt | Interrupt a kernel\n*KernelsApi* | [**api_kernels_kernel_id_restart_post**](docs/KernelsApi.md#api_kernels_kernel_id_restart_post) | **POST** /api/kernels/{kernel_id}/restart | Restart a kernel\n*KernelsApi* | [**api_kernels_post**](docs/KernelsApi.md#api_kernels_post) | **POST** /api/kernels | Start a kernel and return the uuid\n*KernelspecsApi* | [**api_kernelspecs_get**](docs/KernelspecsApi.md#api_kernelspecs_get) | **GET** /api/kernelspecs | Get kernel specs\n*SessionsApi* | [**api_sessions_get**](docs/SessionsApi.md#api_sessions_get) | **GET** /api/sessions | List available sessions\n*SessionsApi* | [**api_sessions_post**](docs/SessionsApi.md#api_sessions_post) | **POST** /api/sessions | Create a new session, or return an existing session if a session of the same name already exists\n*SessionsApi* | [**api_sessions_session_delete**](docs/SessionsApi.md#api_sessions_session_delete) | **DELETE** /api/sessions/{session} | Delete a session\n*SessionsApi* | [**api_sessions_session_get**](docs/SessionsApi.md#api_sessions_session_get) | **GET** /api/sessions/{session} | Get session\n*SessionsApi* | [**api_sessions_session_patch**](docs/SessionsApi.md#api_sessions_session_patch) | **PATCH** /api/sessions/{session} | This can be used to rename the session.\n*StatusApi* | [**api_status_get**](docs/StatusApi.md#api_status_get) | **GET** /api/status | Get the current status/activity of the server.\n*TerminalsApi* | [**api_terminals_get**](docs/TerminalsApi.md#api_terminals_get) | **GET** /api/terminals | Get available terminals\n*TerminalsApi* | [**api_terminals_post**](docs/TerminalsApi.md#api_terminals_post) | **POST** /api/terminals | Create a new terminal\n*TerminalsApi* | [**api_terminals_terminal_id_delete**](docs/TerminalsApi.md#api_terminals_terminal_id_delete) | **DELETE** /api/terminals/{terminal_id} | Delete a terminal session corresponding to an id.\n*TerminalsApi* | [**api_terminals_terminal_id_get**](docs/TerminalsApi.md#api_terminals_terminal_id_get) | **GET** /api/terminals/{terminal_id} | Get a terminal session corresponding to an id.\n\n\n## Documentation For Models\n\n - [APIStatus](docs/APIStatus.md)\n - [ApiContentsPathGet400Response](docs/ApiContentsPathGet400Response.md)\n - [ApiContentsPathPostRequest](docs/ApiContentsPathPostRequest.md)\n - [ApiContentsPathPutRequest](docs/ApiContentsPathPutRequest.md)\n - [ApiGet200Response](docs/ApiGet200Response.md)\n - [ApiKernelsPostRequest](docs/ApiKernelsPostRequest.md)\n - [ApiKernelspecsGet200Response](docs/ApiKernelspecsGet200Response.md)\n - [ApiMeGet200Response](docs/ApiMeGet200Response.md)\n - [ApiSessionsPost501Response](docs/ApiSessionsPost501Response.md)\n - [Checkpoints](docs/Checkpoints.md)\n - [Contents](docs/Contents.md)\n - [Identity](docs/Identity.md)\n - [Kernel](docs/Kernel.md)\n - [KernelSpec](docs/KernelSpec.md)\n - [KernelSpecFile](docs/KernelSpecFile.md)\n - [KernelSpecFileHelpLinksInner](docs/KernelSpecFileHelpLinksInner.md)\n - [KernelSpecResources](docs/KernelSpecResources.md)\n - [Session](docs/Session.md)\n - [Terminal](docs/Terminal.md)\n\n\n<a id=\"documentation-for-authorization\"></a>\n## Documentation For Authorization\n\nEndpoints do not require authorization.\n\n\n## Author\n\n\n\n\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Jupyter Server API",
"version": "1.5.0",
"project_urls": {
"Homepage": "https://github.com/americandatascience/nbserv-client",
"Repository": "https://github.com/americandatascience/nbserv-client"
},
"split_keywords": [
"openapi",
"openapi-generator",
"jupyter server api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "732255912d6964d0b976f381191766d6ecb0d9cc8aa4d3666464bfc45a2900b2",
"md5": "f25638746d5e2772bbfe624d3c636b3b",
"sha256": "622af142ff45fd1aeba95671ed976bb59c5b9565abda54f0a75b743f983cd723"
},
"downloads": -1,
"filename": "nbserv_client-1.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f25638746d5e2772bbfe624d3c636b3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 69521,
"upload_time": "2024-01-10T02:43:22",
"upload_time_iso_8601": "2024-01-10T02:43:22.975118Z",
"url": "https://files.pythonhosted.org/packages/73/22/55912d6964d0b976f381191766d6ecb0d9cc8aa4d3666464bfc45a2900b2/nbserv_client-1.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7cee57f9853da89c2ae69e2f523c295cc99fa8e809c6dc6cc97c80babe66c56e",
"md5": "ddd890bd414ad743e7909c8bd8003db9",
"sha256": "530c666395b06066e647f44bbfb271f57864a8209eb6defb20a6d96050d395b2"
},
"downloads": -1,
"filename": "nbserv_client-1.5.0.tar.gz",
"has_sig": false,
"md5_digest": "ddd890bd414ad743e7909c8bd8003db9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 34700,
"upload_time": "2024-01-10T02:43:24",
"upload_time_iso_8601": "2024-01-10T02:43:24.735593Z",
"url": "https://files.pythonhosted.org/packages/7c/ee/57f9853da89c2ae69e2f523c295cc99fa8e809c6dc6cc97c80babe66c56e/nbserv_client-1.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-10 02:43:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "americandatascience",
"github_project": "nbserv-client",
"github_not_found": true,
"lcname": "nbserv-client"
}