Skip to content

Commit 3b9379b

Browse files
Merge pull request #106 from JohanMabille/connectionfile-spec
JEP for specifying the connectionfile
2 parents 6d9a65f + f357187 commit 3b9379b

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: connection file specification
3+
authors: Johan Mabille
4+
issue-number: XX
5+
pr-number: XX
6+
date-started: "2023-04-19"
7+
---
8+
9+
# Specification of the connection file
10+
11+
## Problem
12+
13+
The connection file is [documented](https://github.com/jupyter/jupyter_client/blob/main/docs/kernels.rst) aside the kernel protocol documentation, but it is not *specified*.
14+
15+
## Proposed Enhancement
16+
17+
We propose to specify the connection file with the JSON schema joined in this PR. The specification would reflect
18+
[the current description of the connection file](https://jupyter-client.readthedocs.io/en/stable/kernels.html#connection-files).
19+
20+
The documentation of the connection file will be stored along side [those of the kernel protocol](https://github.com/jupyter-standards/kernel-protocol) while its specification will be stored in the [Jupyter schema repo](https://github.com/jupyter/schema).
21+
22+
### Impact on existing implementations
23+
24+
None, this JEP only specifies the current implementations.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schema.jupyter.org/connectionfile-v1.0.schema.json",
4+
"title": "Jupyter Connection File",
5+
"description": "A description of the data required to connect and send messages to a Jupyter Kernel",
6+
"type": "object",
7+
8+
"definitions": {
9+
"signature": {
10+
"type": "object",
11+
"required": ["signature_scheme", "key"],
12+
"properties": {
13+
"signature_scheme": {
14+
"enum": ["hmac-md5","hmac-sha256","hmac-sha512"],
15+
"description": "scheme used to sign the messages"
16+
},
17+
"key": {
18+
"type": "string",
19+
"description": "key used to sign the messages"
20+
}
21+
}
22+
},
23+
"kernel_network": {
24+
"type": "object",
25+
"required": ["transport", "ip", "shell_port", "control_port", "stdin_port", "hb_port", "iopub_port"],
26+
"properties": {
27+
"transport": {
28+
"type": "string",
29+
"description": "transport protocol",
30+
"enum": ["tcp", "ipc", "inproc"]
31+
},
32+
"ip": {
33+
"type": "string",
34+
"description": "ip of the machine where the kernel runs"
35+
},
36+
"shell_port": {
37+
"type": ["integer","string"],
38+
"description": "port used by the shell channel"
39+
},
40+
"control_port": {
41+
"type": ["integer","string"],
42+
"description": "port used by the control channel"
43+
},
44+
"stdin_port": {
45+
"type": ["integer","string"],
46+
"description": "port used by the stdin channel"
47+
},
48+
"hb_port": {
49+
"type": ["integer","string"],
50+
"description": "port used by the heartbeat channel"
51+
},
52+
"iopub_port": {
53+
"type": ["ingerer","string"],
54+
"description": "port used by the iopub channel"
55+
}
56+
}
57+
}
58+
},
59+
"allOf": [
60+
{ "$ref": "#/definitions/kernel_network" },
61+
{ "$ref": "#/definitions/signature" }
62+
]
63+
}
64+

0 commit comments

Comments
 (0)