Skip to content

Commit cc8176b

Browse files
committed
Update doc with Carol's suggestions
1 parent c09b8ac commit cc8176b

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

docs/kernel_providers.rst

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ Kernel providers
33
================
44

55
.. note::
6-
This is a new interface under development. Not all Jupyter applications
7-
use this yet. See :ref:`kernelspecs` for the established way of discovering
8-
kernel types.
6+
This is a new interface under development, and may still change.
7+
Not all Jupyter applications use this yet.
8+
See :ref:`kernelspecs` for the established way of discovering kernel types.
9+
10+
Creating a kernel provider
11+
==========================
912

1013
By writing a kernel provider, you can extend how Jupyter applications discover
11-
and start kernels. To do so, subclass
14+
and start kernels. For example, you could find kernels in an environment system
15+
like conda, or kernels on remote systems which you can access.
16+
17+
To write a kernel provider, subclass
1218
:class:`jupyter_client.discovery.KernelProviderBase`, giving your provider an ID
1319
and overriding two methods.
1420

@@ -47,8 +53,8 @@ called *oblong*::
4753
if not which('oblong-kernel'):
4854
return # Check it's available
4955

50-
# Two variants - for a real kernel, these could be different
51-
# environments
56+
# Two variants - for a real kernel, these could be something like
57+
# different conda environments.
5258
yield 'standard', {
5359
'display_name': 'Oblong (standard)',
5460
'language': {'name': 'oblong'},
@@ -85,8 +91,9 @@ Finding kernel types
8591
====================
8692

8793
To find and start kernels in client code, use
88-
:class:`jupyter_client.discovery.KernelFinder`. This has a similar API to kernel
89-
providers, but it wraps a set of kernel providers. The kernel names it works
94+
:class:`jupyter_client.discovery.KernelFinder`. This uses multiple kernel
95+
providers to find available kernels. Like a kernel provider, it has methods
96+
``find_kernels`` and ``make_manager``. The kernel names it works
9097
with have the provider ID as a prefix, e.g. ``oblong/rounded`` (from the example
9198
above).
9299

@@ -116,8 +123,8 @@ above).
116123

117124
.. automethod:: make_manager
118125

119-
Included kernel providers
120-
=========================
126+
Kernel providers included in ``jupyter_client``
127+
===============================================
121128

122129
``jupyter_client`` includes two kernel providers:
123130

@@ -135,9 +142,9 @@ Kernel instance
135142
Its state includes a namespace and an execution counter.
136143

137144
Kernel type
138-
Allows starting multiple, initially similar kernel instances. The kernel type
139-
entails the combination of software to run the kernel, and the context in
140-
which it starts. For instance, one kernel type may be associated with one
145+
The software to run a kernel instance, along with the context in which a
146+
kernel starts. One kernel type allows starting multiple, initially similar
147+
kernel instances. For instance, one kernel type may be associated with one
141148
conda environment containing ``ipykernel``. The same kernel software in
142149
another environment would be a different kernel type. Another software package
143150
for a kernel, such as ``IRkernel``, would also be a different kernel type.

0 commit comments

Comments
 (0)