Unofficial Python API client for Jupyter
Project description
Jupyter API Client
Setup
pip install jupyter-api-client
example
- initialize client
from jupyter_api import JupyterClient
TOKEN = os.getenv("JUPYTER_TOKEN")
client = JupyterClient(host="localhost:8888", schema="http", token=TOKEN)
- create kernel
kernel_id = client.create_kernel(language="python3")
- run linux command or code
print(client.execute_code(f"!ls -l", kernel_id, cell=False))
print(client.execute_code(f"print('hello world')", kernel_id))
- delete kernel
client.delete_kernel(kernel_id)
- upload file
client.upload_file("README.md", "README.md")
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
Close
Hashes for jupyter_api_client-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9980af71a97e412740fade6e98358418d6db96caf59756211657b7faeb73ab8d |
|
MD5 | b6c2997303f1ddb7640da0fb2086e4c2 |
|
BLAKE2b-256 | bb9befee42e63af2eb2f3dd5da06b431d66a14697e93b311d6beaa40ce4d5841 |