pup-py commited on
Commit
8646cfb
·
1 Parent(s): 60150c3

version, build details

Browse files
Files changed (2) hide show
  1. nb/prod_home.py +11 -3
  2. src/marimo_apps.py +16 -0
nb/prod_home.py CHANGED
@@ -6,15 +6,20 @@ app = marimo.App(width="full", app_title="🏰 Home")
6
 
7
  @app.cell
8
  def _():
 
9
  import marimo as mo
10
- from src.marimo_apps import UI
 
 
 
11
 
 
12
  return UI, mo
13
 
14
 
15
  @app.cell
16
  def _(UI, mo):
17
- md = mo.md("""
18
  # Yes, Notebooks In Production | PyCon 2026
19
 
20
  ### Description
@@ -22,7 +27,7 @@ def _(UI, mo):
22
  The attendees will learn about marimo notebooks, a new interactive compute environment for python that is gaining traction as an alternative to Jupyter.
23
  Being plain python files, marimo notebooks are testable and mountable on top of apps built with existing python web frameworks.
24
  The attendees will build a self-documenting FastAPI app for accessing and visualizing local or cloud data, featuring multiple web paths with notebook-based navigation and UI.
25
-
26
  This is a code-along tutorial that runs locally on any laptop and any OS, with trivial initial setup and minimal use of AI tools.
27
 
28
  ### Audience
@@ -46,6 +51,9 @@ def _(UI, mo):
46
  [02:00 - 02:15] What about AI?
47
  [02:15 - 02:30] Deployment and monitoring
48
  [02:30 - 03:00] Q&A + optional Task 5: build your own
 
 
 
49
  """)
50
 
51
  mo.hstack([UI.NAV, md], widths=[1, 5])
 
6
 
7
  @app.cell
8
  def _():
9
+ from pathlib import Path
10
  import marimo as mo
11
+ import sys
12
+
13
+ ROOT = Path(__file__).parent.parent
14
+ sys.path.append(ROOT.as_posix())
15
 
16
+ from src.marimo_apps import UI
17
  return UI, mo
18
 
19
 
20
  @app.cell
21
  def _(UI, mo):
22
+ md = mo.md(f"""
23
  # Yes, Notebooks In Production | PyCon 2026
24
 
25
  ### Description
 
27
  The attendees will learn about marimo notebooks, a new interactive compute environment for python that is gaining traction as an alternative to Jupyter.
28
  Being plain python files, marimo notebooks are testable and mountable on top of apps built with existing python web frameworks.
29
  The attendees will build a self-documenting FastAPI app for accessing and visualizing local or cloud data, featuring multiple web paths with notebook-based navigation and UI.
30
+
31
  This is a code-along tutorial that runs locally on any laptop and any OS, with trivial initial setup and minimal use of AI tools.
32
 
33
  ### Audience
 
51
  [02:00 - 02:15] What about AI?
52
  [02:15 - 02:30] Deployment and monitoring
53
  [02:30 - 03:00] Q&A + optional Task 5: build your own
54
+
55
+ /// details | Build details
56
+ {UI.VERSION}
57
  """)
58
 
59
  mo.hstack([UI.NAV, md], widths=[1, 5])
src/marimo_apps.py CHANGED
@@ -11,6 +11,21 @@ NB_FOLDER = Path(__file__).parent.parent / "nb"
11
  logger.info(f"NB_FOLDER: {NB_FOLDER}")
12
 
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  class MarimoApps:
15
  def __init__(self, folder: Path = NB_FOLDER):
16
  self.folder = folder
@@ -43,3 +58,4 @@ marimo_apps = MarimoApps()
43
  class UI:
44
  TITLE = "Marimo on FastAPI"
45
  NAV = nav_menu(marimo_apps.pages, orientation="vertical").style(font_size="20px")
 
 
11
  logger.info(f"NB_FOLDER: {NB_FOLDER}")
12
 
13
 
14
+ def get_versions() -> str:
15
+ from duckdb import __version__ as duckdb_version
16
+ from fastapi import __version__ as fastapi_version
17
+ from marimo import __version__ as marimo_version
18
+ from sys import version as python_version
19
+
20
+ versions = f"""
21
+ marimo: {marimo_version}
22
+ FastAPI: {fastapi_version}
23
+ DuckDB: {duckdb_version}
24
+ python: {python_version}
25
+ """
26
+ return versions
27
+
28
+
29
  class MarimoApps:
30
  def __init__(self, folder: Path = NB_FOLDER):
31
  self.folder = folder
 
58
  class UI:
59
  TITLE = "Marimo on FastAPI"
60
  NAV = nav_menu(marimo_apps.pages, orientation="vertical").style(font_size="20px")
61
+ VERSION = get_versions()