Skip to content

Commit

Permalink
marimo notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianBach committed Apr 3, 2024
1 parent 951c41c commit db83a53
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The *full stack* contains:
* A unit test that tests this module.
* A *Sphinx* documentation for this module.
* A *Jupyter Notebook* showing how to use this module.
* a *marimo* notbook using this module.
* A Python UI application that uses this module.
* A WebAssembly binary library and associated JavaScript code.
* An HTML/JavaScript frontend that uses the above WebAssembly library.
Expand Down Expand Up @@ -91,6 +92,7 @@ The *full stack* contains:
PY --> PYTEST[Python Module Unit Test]
PY --> SPHINX(Sphinx Documentation)
PY --> NOTEBOOK[Jupyter Notebook]
PY --> MARIMO[Marimo Notebook]
PY --> PYAPP[Python UI App]
F --> WASM(WebAssembly + JavaScript)
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if(ADD_PYTHON_MODULE)
add_subdirectory(py)
add_subdirectory(app_py)
add_subdirectory(py_ipynb)
add_subdirectory(py_marimo)
endif()

if(ADD_PY_DOCS)
Expand Down
2 changes: 2 additions & 0 deletions src/py_marimo/start_marimo_notebook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export PYTHONPATH=$PYTHONPATH:.
marimo run title_case_marimo.py --port=2719 --headless
40 changes: 40 additions & 0 deletions src/py_marimo/title_case_marimo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import marimo


__generated_with = "0.1.5"
app = marimo.App()


@app.cell
def __():
import marimo as mo
return mo,


@app.cell
def __(mo):
mo.md("# Title Case Demonstration").left()
return


@app.cell
def __(mo):
text = mo.ui.text(placeholder="Enter text ...", label="Headline:", full_width=True)
return text,

@app.cell
def __(mo, text):
import text_conversion
result = text_conversion.title_case(text.value)

return result


@app.cell
def __(mo, text, result):
mo.vstack([text, mo.md(f"Result: \"{result}\"")])
return


if __name__ == "__main__":
app.run()

0 comments on commit db83a53

Please sign in to comment.