powergridforge 1.1.3__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.
gridforge/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+ from importlib.metadata import version, PackageNotFoundError
2
+
3
+ try:
4
+ __version__ = version("gridforge")
5
+ except PackageNotFoundError:
6
+ __version__ = "0.0.0"
7
+
8
+ __all__ = ["__version__"]
gridforge/app_cli.py ADDED
@@ -0,0 +1,21 @@
1
+ """
2
+ Console launcher for the GridForge Streamlit app.
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ import os
8
+ import sys
9
+
10
+
11
+ def main() -> None:
12
+ try:
13
+ from streamlit.web import cli as stcli
14
+ except ImportError as exc:
15
+ raise SystemExit(
16
+ "The GridForge app requires Streamlit. Install it with `pip install \"gridforge[app]\"`."
17
+ ) from exc
18
+
19
+ app_path = os.path.join(os.path.dirname(__file__), "config_app.py")
20
+ sys.argv = ["streamlit", "run", app_path]
21
+ raise SystemExit(stcli.main())