jupyverse 0.0.49__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
jupyverse/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.49"
1
+ __version__ = "0.1.2"
jupyverse/cli.py ADDED
@@ -0,0 +1,97 @@
1
+ import pkg_resources
2
+ from typing import List
3
+
4
+ import rich_click as click
5
+ from asphalt.core.cli import run
6
+
7
+
8
+ @click.command()
9
+ @click.option(
10
+ "--open-browser",
11
+ is_flag=True,
12
+ show_default=True,
13
+ default=False,
14
+ help="Open a browser window.",
15
+ )
16
+ @click.option(
17
+ "--host",
18
+ type=str,
19
+ default="127.0.0.1",
20
+ help="The host URL.",
21
+ )
22
+ @click.option(
23
+ "--port",
24
+ type=int,
25
+ default=8000,
26
+ help="The host port.",
27
+ )
28
+ @click.option(
29
+ "--set",
30
+ "set_",
31
+ multiple=True,
32
+ type=str,
33
+ help="Set configuration.",
34
+ )
35
+ @click.option(
36
+ "--disable",
37
+ multiple=True,
38
+ type=str,
39
+ help="Disable plugin.",
40
+ )
41
+ def main(
42
+ open_browser: bool,
43
+ host: str,
44
+ port: int,
45
+ set_: List[str],
46
+ disable: List[str],
47
+ ) -> None:
48
+ set_ = list(set_)
49
+ for i, s in enumerate(set_):
50
+ set_[i] = f"component.components.{s}"
51
+ set_.append(f"component.open_browser={open_browser}")
52
+ set_.append(f"component.host={host}")
53
+ set_.append(f"component.port={port}")
54
+ config = get_config(disable)
55
+ run.callback(
56
+ unsafe=False,
57
+ loop=None,
58
+ set_=set_,
59
+ service=None,
60
+ configfile=[config],
61
+ ) # type: ignore
62
+
63
+
64
+ def get_config(disable: List[str]) -> str:
65
+ jupyverse_components = [
66
+ ep.name
67
+ for ep in pkg_resources.iter_entry_points(group="jupyverse.components")
68
+ if ep.name not in disable
69
+ ]
70
+
71
+ config = ["component:\n type: jupyverse\n components:\n"]
72
+ for component in jupyverse_components:
73
+ config.append(f" {component}:\n type: {component}\n")
74
+
75
+ config.append(
76
+ """
77
+ logging:
78
+ version: 1
79
+ disable_existing_loggers: false
80
+ formatters:
81
+ default:
82
+ format: '[%(asctime)s %(levelname)s] %(message)s'
83
+ handlers:
84
+ console:
85
+ class: logging.StreamHandler
86
+ formatter: default
87
+ root:
88
+ handlers: [console]
89
+ level: INFO
90
+ loggers:
91
+ webnotifier:
92
+ level: DEBUG
93
+ """
94
+ )
95
+
96
+ config_str = "".join(config)
97
+ return config_str
jupyverse/py.typed ADDED
File without changes
@@ -1,36 +1,39 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jupyverse
3
- Version: 0.0.49
3
+ Version: 0.1.2
4
4
  Summary: A set of FPS plugins implementing a Jupyter server
5
5
  Project-URL: Homepage, https://jupyter.org
6
6
  Author-email: Jupyter Development Team <jupyter@googlegroups.com>
7
7
  License: BSD 3-Clause License
8
8
  License-File: COPYING.md
9
- Keywords: fastapi,jupyter,pluggy,plugins,server
10
- Requires-Python: >=3.7
11
- Requires-Dist: fastapi>=0.87.0
12
- Requires-Dist: fps-auth-base>=0.0.42
13
- Requires-Dist: fps-contents>=0.0.42
14
- Requires-Dist: fps-kernels>=0.0.42
15
- Requires-Dist: fps-nbconvert>=0.0.42
16
- Requires-Dist: fps-terminals>=0.0.42
17
- Requires-Dist: fps-uvicorn>=0.0.19
18
- Requires-Dist: fps-yjs>=0.0.42
19
- Requires-Dist: fps>=0.0.21
9
+ Keywords: fastapi,jupyter,plugins,server
10
+ Requires-Python: >=3.8
11
+ Requires-Dist: asphalt-web[fastapi]<2,>=1.1.0
12
+ Requires-Dist: asphalt<5,>=4.11.0
13
+ Requires-Dist: fastapi<1,>=0.95.0
14
+ Requires-Dist: fps-contents
15
+ Requires-Dist: fps-kernels
16
+ Requires-Dist: fps-nbconvert
17
+ Requires-Dist: fps-terminals
18
+ Requires-Dist: fps-yjs
19
+ Requires-Dist: jupyverse-api
20
+ Requires-Dist: rich-click<2,>=1.6.1
20
21
  Provides-Extra: auth
21
- Requires-Dist: fps-auth>=0.0.42; extra == 'auth'
22
+ Requires-Dist: fps-auth; extra == 'auth'
22
23
  Provides-Extra: auth-fief
23
- Requires-Dist: fps-auth-fief>=0.0.42; extra == 'auth-fief'
24
+ Requires-Dist: fps-auth-fief; extra == 'auth-fief'
24
25
  Provides-Extra: docs
25
26
  Requires-Dist: mkdocs; extra == 'docs'
26
27
  Requires-Dist: mkdocs-material; extra == 'docs'
27
28
  Provides-Extra: jupyterlab
28
- Requires-Dist: fps-jupyterlab>=0.0.42; extra == 'jupyterlab'
29
+ Requires-Dist: fps-jupyterlab; extra == 'jupyterlab'
29
30
  Provides-Extra: noauth
30
- Requires-Dist: fps-noauth>=0.0.42; extra == 'noauth'
31
+ Requires-Dist: fps-noauth; extra == 'noauth'
31
32
  Provides-Extra: retrolab
32
- Requires-Dist: fps-retrolab>=0.0.42; extra == 'retrolab'
33
+ Requires-Dist: fps-retrolab; extra == 'retrolab'
33
34
  Provides-Extra: test
35
+ Requires-Dist: httpx; extra == 'test'
36
+ Requires-Dist: httpx-ws; extra == 'test'
34
37
  Requires-Dist: ipykernel; extra == 'test'
35
38
  Requires-Dist: mypy; extra == 'test'
36
39
  Requires-Dist: pytest; extra == 'test'
@@ -0,0 +1,9 @@
1
+ jupyverse/__init__.py,sha256=YvuYzWnKtqBb-IqG8HAu-nhIYAsgj9Vmc_b9o7vO-js,22
2
+ jupyverse/cli.py,sha256=ifJSUEcGgld2poIqSXTW4OPemNS3lDTWs4b8WsXpycY,2006
3
+ jupyverse/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ jupyverse/static/favicon.ico,sha256=wmOKif3jYzYX7GJAiHMMHb5NrxjU8uRHKezonfPmAXY,32038
5
+ jupyverse-0.1.2.dist-info/METADATA,sha256=-pgvI7ExDqVMg2m2JXjRqXhRlK1ATid_WMwcDR_YeR4,2545
6
+ jupyverse-0.1.2.dist-info/WHEEL,sha256=EI2JsGydwUL5GP9t6kzZv7G3HDPi7FuZDDf9In6amRM,87
7
+ jupyverse-0.1.2.dist-info/entry_points.txt,sha256=-LBSelCiKOl5V8SxfSrraXoB45Yt_jvaPC6QOZXlEqY,49
8
+ jupyverse-0.1.2.dist-info/licenses/COPYING.md,sha256=mhO0ZW9EiWOPg0dUgB-lNbJ0CGwRmTdbeAg_se1SOnY,2833
9
+ jupyverse-0.1.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.12.2
2
+ Generator: hatchling 1.14.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ jupyverse = jupyverse.cli:main
@@ -1,7 +0,0 @@
1
- jupyverse/__init__.py,sha256=LuIJFrM65iX-YC6KaWH9iJWJKBv1GHcHHucNCmnVUqo,23
2
- jupyverse/static/favicon.ico,sha256=wmOKif3jYzYX7GJAiHMMHb5NrxjU8uRHKezonfPmAXY,32038
3
- jupyverse-0.0.49.dist-info/METADATA,sha256=upyRXu3gBN0N7i3NSEDlNWxiC3hJtzV0fz5i1NIhdeg,2505
4
- jupyverse-0.0.49.dist-info/WHEEL,sha256=hKi7AIIx6qfnsRbr087vpeJnrVUuDokDHZacPPMW7-Y,87
5
- jupyverse-0.0.49.dist-info/entry_points.txt,sha256=TTQyC22a50aA1GqVcDuXgMdOlp4dijNL57EGDbjc5_E,50
6
- jupyverse-0.0.49.dist-info/licenses/COPYING.md,sha256=mhO0ZW9EiWOPg0dUgB-lNbJ0CGwRmTdbeAg_se1SOnY,2833
7
- jupyverse-0.0.49.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- jupyverse = fps_uvicorn.cli:app