prismnote 0.3.1__tar.gz → 0.4.0__tar.gz

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.
@@ -0,0 +1,243 @@
1
+ Metadata-Version: 2.4
2
+ Name: prismnote
3
+ Version: 0.4.0
4
+ Summary: Modern, open-source Jupyter-compatible data science notebook with Rust performance
5
+ Author-email: Georgi Mammen Mullassery <mullassery@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Mullassery/prismnote
8
+ Project-URL: Repository, https://github.com/Mullassery/prismnote
9
+ Project-URL: Documentation, https://github.com/Mullassery/prismnote#readme
10
+ Project-URL: Bug Tracker, https://github.com/Mullassery/prismnote/issues
11
+ Keywords: notebook,jupyter,data-science,sql,python,rust
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Topic :: Software Development :: Libraries
24
+ Classifier: Environment :: Web Environment
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: ipykernel>=6.0
29
+ Requires-Dist: jupyter>=1.0
30
+ Provides-Extra: sql
31
+ Requires-Dist: psycopg2-binary>=2.9; extra == "sql"
32
+ Requires-Dist: pymysql>=1.0; extra == "sql"
33
+ Provides-Extra: postgres
34
+ Requires-Dist: psycopg2-binary>=2.9; extra == "postgres"
35
+ Provides-Extra: mysql
36
+ Requires-Dist: pymysql>=1.0; extra == "mysql"
37
+ Provides-Extra: cloud
38
+ Requires-Dist: snowflake-connector-python>=3.0; extra == "cloud"
39
+ Requires-Dist: google-cloud-bigquery>=3.0; extra == "cloud"
40
+ Requires-Dist: amazon-redshift-python-driver>=1.0; extra == "cloud"
41
+ Requires-Dist: databricks-sql-connector>=1.0; extra == "cloud"
42
+ Provides-Extra: ai
43
+ Requires-Dist: anthropic>=0.7; extra == "ai"
44
+ Provides-Extra: openai
45
+ Requires-Dist: openai>=1.0; extra == "openai"
46
+ Provides-Extra: spark
47
+ Requires-Dist: pyspark>=3.0; extra == "spark"
48
+ Requires-Dist: pyarrow>=10; extra == "spark"
49
+ Provides-Extra: dev
50
+ Requires-Dist: pytest>=7.0; extra == "dev"
51
+ Requires-Dist: black>=22.0; extra == "dev"
52
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
53
+ Dynamic: license-file
54
+
55
+ <div align="center">
56
+
57
+ # ◆ PrismNote
58
+
59
+ **A fast, modern, open-source data-science notebook.**
60
+ Rust engine · React UI · local-first · AI-native.
61
+
62
+ **License:** MIT · **Status:** Beta (v0.4)
63
+
64
+ </div>
65
+
66
+ ---
67
+
68
+ ## Overview
69
+
70
+ PrismNote is a local-first alternative to Jupyter, Zeppelin, and Databricks notebooks.
71
+ It pairs a **Rust + Axum** backend and a **persistent Python kernel** with a modern,
72
+ **VS Code-style React** interface. Write Python and SQL, get rich output and live
73
+ charts, ask a local AI for help, schedule notebooks as jobs, manage git, and ship to
74
+ the cloud — all from one app that runs entirely on your machine.
75
+
76
+ - **Local-first & private** — runs on your machine; local AI via Ollama, no account required.
77
+ - **Jupyter-compatible** — native `.ipynb` format.
78
+ - **Batteries included** — kernel, SQL, charts, AI, jobs, git, deploy, search, terminal.
79
+
80
+ ---
81
+
82
+ ## Features
83
+
84
+ ### Notebook & execution
85
+ - **Persistent shared kernel** — variables, imports, and functions defined in one cell
86
+ are available in every later cell (true notebook semantics).
87
+ - **Per-cell interpreters (magics)**:
88
+ - `%python` (default) — runs in the shared kernel.
89
+ - `%sql` — in-process **DuckDB**; can query pandas DataFrames defined in other cells.
90
+ - `%sh` / `%bash` / `!cmd` — shell commands.
91
+ - `%md` / `%markdown` — rendered markdown.
92
+ - **Rich output** — text, HTML, matplotlib figures (`image/png`), and pandas DataFrames.
93
+ - **Chart switcher** — view any DataFrame as a **Table, Bar, or Line** chart.
94
+ - **Live streamed output** over WebSocket while a cell runs.
95
+ - **Interrupt** a running cell (Stop) and **restart** the kernel from the toolbar/menu.
96
+ - **Dynamic input widgets** — `prism.input / slider / select / checkbox` render controls
97
+ that re-run the cell when changed (Databricks `dbutils.widgets`-style).
98
+ - Pretty-printing enabled by default via `rich`.
99
+
100
+ ### AI assistance
101
+ Works with **local models via Ollama** (free, private, offline) or **Claude / OpenAI**.
102
+ - **⌘K in-cell edit** — describe a change, review a diff, accept or reject.
103
+ - **Fix with AI** — one click on an errored cell.
104
+ - **Explain** — a teaching-oriented explanation with a contextual tip.
105
+ - **Inline autocomplete** — ghost-text completions when Ollama is connected.
106
+ - **Teacher persona** — any model explains the "why" and suggests tips/tricks.
107
+ - **Agent panel** — Plan/Act assistant that can propose and apply cell edits.
108
+
109
+ ### Errors that help
110
+ - **Natural-language explanations** for common Python errors (NameError, KeyError,
111
+ ModuleNotFoundError, TypeError, ZeroDivisionError, SyntaxError, …).
112
+ - **In-editor markers** highlighting the offending **line and column**.
113
+ - Collapsible full traceback when you want the details.
114
+
115
+ ### Workflow: Jobs, Airflow, Git, Deploy
116
+ - **Jobs** — save a whole notebook and run it as a unit, **manual / interval / daily**,
117
+ with status and run history (Airflow-style).
118
+ - **Airflow** — a stable `run-by-name` trigger plus a **generated, ready-to-use DAG**.
119
+ - **Source control** — `init`, `clone`, `commit`, `push`, `pull`, `status` from the UI.
120
+ - **Cloud deploy** — generated `Dockerfile`, `docker-compose.yml`, `k8s.yaml`, and
121
+ `fly.toml`, each with its one-line deploy command.
122
+
123
+ ### Workspace & UX
124
+ - VS Code-style layout: activity rail, collapsible panels, status bar.
125
+ - **All panels collapsible**, each with **independent font +/-** controls.
126
+ - **Responsive** — side panels auto-collapse on narrow windows.
127
+ - **Global search (⌘K)**, **command palette (⇧⌘P)**, working top menus.
128
+ - Integrated **Terminal**, a **Python Console** (shares the kernel), and a **file browser**
129
+ (works in any browser via a server-side browser).
130
+ - Dark/light themes; `.ipynb` import/export.
131
+
132
+ ### Data connectivity
133
+ - DuckDB in-process SQL engine.
134
+ - Connection scaffolding for 8 cloud warehouses (Snowflake, BigQuery, Redshift,
135
+ Azure Synapse, Databricks, Athena, Presto, Trino) — see [CLOUD_WAREHOUSES.md](CLOUD_WAREHOUSES.md).
136
+
137
+ ---
138
+
139
+ ## Architecture
140
+
141
+ ```
142
+ ┌──────────────────────────────┐ ┌─────────────────────────────┐
143
+ │ React + TypeScript (Vite) │ HTTP │ Rust backend (Axum) │
144
+ │ Monaco · Tailwind · zustand │ ─────▶ │ REST API + WebSocket │
145
+ │ cells · panels · AI · jobs │ ◀───── │ routing, jobs, git, deploy │
146
+ └──────────────────────────────┘ WS └──────────────┬──────────────┘
147
+ │ stdin/stdout (JSON)
148
+ ┌───────▼────────┐
149
+ │ Persistent │
150
+ │ Python kernel │
151
+ │ (shared globals)│
152
+ └─────────────────┘
153
+ ```
154
+
155
+ - **Backend**: Rust (Axum + Tokio). Spawns one long-lived Python process and talks to
156
+ it over a line-framed JSON protocol; outputs are Jupyter-style MIME bundles.
157
+ - **Frontend**: React 18 + TypeScript + Vite, Monaco editor, Tailwind CSS.
158
+ - **Kernel**: a single `python` process with a shared namespace; SIGINT-interruptible,
159
+ restartable, with matplotlib (Agg) and rich preloaded.
160
+
161
+ ---
162
+
163
+ ## Getting started
164
+
165
+ ### Prerequisites
166
+ - **Rust** (stable) and **Node.js 18+**
167
+ - **Python 3.8+** on your `PATH` with `ipykernel`:
168
+ ```bash
169
+ pip install ipykernel pandas matplotlib rich duckdb
170
+ ```
171
+ - *(optional)* **Ollama** for local AI: https://ollama.com — then `ollama pull qwen2.5-coder`
172
+
173
+ ### Run in development
174
+ ```bash
175
+ # 1) backend (port 8000)
176
+ cargo run
177
+
178
+ # 2) frontend (port 5173, proxies /api and /ws to the backend)
179
+ cd frontend && npm install && npm run dev
180
+ ```
181
+ Open http://localhost:5173.
182
+
183
+ ### Configure AI (optional)
184
+ - **Local (Ollama)**: start Ollama and pick a model in the AI panel.
185
+ - **Claude/OpenAI**: set in the AI settings, or via env:
186
+ ```bash
187
+ export PRISMNOTE_AI_PROVIDER=claude # or openai / ollama
188
+ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY
189
+ ```
190
+ Settings saved in the UI persist to `~/.prismnote/ai_config.json`.
191
+
192
+ ---
193
+
194
+ ## Deploy
195
+
196
+ Open **Deploy to Cloud** (rocket icon) to copy/download ready-to-use artifacts:
197
+
198
+ ```bash
199
+ docker compose up -d # Docker
200
+ kubectl apply -f k8s.yaml # Kubernetes
201
+ fly launch --copy-config --now# Fly.io
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Keyboard shortcuts
207
+
208
+ | Shortcut | Action |
209
+ |---|---|
210
+ | `⌘N` / `⌘O` / `⌘S` | New / Open / Save notebook |
211
+ | `⌘K` | Global search |
212
+ | `⇧⌘P` | Command palette |
213
+ | `⌘K` *(in a cell)* | AI edit |
214
+ | `⌘⇧⏎` | Run all cells |
215
+ | `⇧⏎` | Run cell |
216
+
217
+ ---
218
+
219
+ ## Repository layout
220
+
221
+ ```
222
+ crates/server/ Rust backend (api, kernel, jobs, db, ws, …)
223
+ frontend/ React app (components, hooks, api clients)
224
+ *.md Architecture & comparison docs
225
+ ```
226
+
227
+ Comparisons: [ZEPPELIN_COMPARISON.md](ZEPPELIN_COMPARISON.md) ·
228
+ [DATABRICKS_COMPARISON.md](DATABRICKS_COMPARISON.md) ·
229
+ [NOTEBOOK_COMPARISON_MATRIX.md](NOTEBOOK_COMPARISON_MATRIX.md)
230
+
231
+ ---
232
+
233
+ ## Roadmap
234
+
235
+ - Distributed compute (Spark) and a catalog/data browser.
236
+ - Real-time collaboration (live cursors/co-editing).
237
+ - Notebook parameters and multi-notebook job composition.
238
+
239
+ ---
240
+
241
+ ## License
242
+
243
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,189 @@
1
+ <div align="center">
2
+
3
+ # ◆ PrismNote
4
+
5
+ **A fast, modern, open-source data-science notebook.**
6
+ Rust engine · React UI · local-first · AI-native.
7
+
8
+ **License:** MIT · **Status:** Beta (v0.4)
9
+
10
+ </div>
11
+
12
+ ---
13
+
14
+ ## Overview
15
+
16
+ PrismNote is a local-first alternative to Jupyter, Zeppelin, and Databricks notebooks.
17
+ It pairs a **Rust + Axum** backend and a **persistent Python kernel** with a modern,
18
+ **VS Code-style React** interface. Write Python and SQL, get rich output and live
19
+ charts, ask a local AI for help, schedule notebooks as jobs, manage git, and ship to
20
+ the cloud — all from one app that runs entirely on your machine.
21
+
22
+ - **Local-first & private** — runs on your machine; local AI via Ollama, no account required.
23
+ - **Jupyter-compatible** — native `.ipynb` format.
24
+ - **Batteries included** — kernel, SQL, charts, AI, jobs, git, deploy, search, terminal.
25
+
26
+ ---
27
+
28
+ ## Features
29
+
30
+ ### Notebook & execution
31
+ - **Persistent shared kernel** — variables, imports, and functions defined in one cell
32
+ are available in every later cell (true notebook semantics).
33
+ - **Per-cell interpreters (magics)**:
34
+ - `%python` (default) — runs in the shared kernel.
35
+ - `%sql` — in-process **DuckDB**; can query pandas DataFrames defined in other cells.
36
+ - `%sh` / `%bash` / `!cmd` — shell commands.
37
+ - `%md` / `%markdown` — rendered markdown.
38
+ - **Rich output** — text, HTML, matplotlib figures (`image/png`), and pandas DataFrames.
39
+ - **Chart switcher** — view any DataFrame as a **Table, Bar, or Line** chart.
40
+ - **Live streamed output** over WebSocket while a cell runs.
41
+ - **Interrupt** a running cell (Stop) and **restart** the kernel from the toolbar/menu.
42
+ - **Dynamic input widgets** — `prism.input / slider / select / checkbox` render controls
43
+ that re-run the cell when changed (Databricks `dbutils.widgets`-style).
44
+ - Pretty-printing enabled by default via `rich`.
45
+
46
+ ### AI assistance
47
+ Works with **local models via Ollama** (free, private, offline) or **Claude / OpenAI**.
48
+ - **⌘K in-cell edit** — describe a change, review a diff, accept or reject.
49
+ - **Fix with AI** — one click on an errored cell.
50
+ - **Explain** — a teaching-oriented explanation with a contextual tip.
51
+ - **Inline autocomplete** — ghost-text completions when Ollama is connected.
52
+ - **Teacher persona** — any model explains the "why" and suggests tips/tricks.
53
+ - **Agent panel** — Plan/Act assistant that can propose and apply cell edits.
54
+
55
+ ### Errors that help
56
+ - **Natural-language explanations** for common Python errors (NameError, KeyError,
57
+ ModuleNotFoundError, TypeError, ZeroDivisionError, SyntaxError, …).
58
+ - **In-editor markers** highlighting the offending **line and column**.
59
+ - Collapsible full traceback when you want the details.
60
+
61
+ ### Workflow: Jobs, Airflow, Git, Deploy
62
+ - **Jobs** — save a whole notebook and run it as a unit, **manual / interval / daily**,
63
+ with status and run history (Airflow-style).
64
+ - **Airflow** — a stable `run-by-name` trigger plus a **generated, ready-to-use DAG**.
65
+ - **Source control** — `init`, `clone`, `commit`, `push`, `pull`, `status` from the UI.
66
+ - **Cloud deploy** — generated `Dockerfile`, `docker-compose.yml`, `k8s.yaml`, and
67
+ `fly.toml`, each with its one-line deploy command.
68
+
69
+ ### Workspace & UX
70
+ - VS Code-style layout: activity rail, collapsible panels, status bar.
71
+ - **All panels collapsible**, each with **independent font +/-** controls.
72
+ - **Responsive** — side panels auto-collapse on narrow windows.
73
+ - **Global search (⌘K)**, **command palette (⇧⌘P)**, working top menus.
74
+ - Integrated **Terminal**, a **Python Console** (shares the kernel), and a **file browser**
75
+ (works in any browser via a server-side browser).
76
+ - Dark/light themes; `.ipynb` import/export.
77
+
78
+ ### Data connectivity
79
+ - DuckDB in-process SQL engine.
80
+ - Connection scaffolding for 8 cloud warehouses (Snowflake, BigQuery, Redshift,
81
+ Azure Synapse, Databricks, Athena, Presto, Trino) — see [CLOUD_WAREHOUSES.md](CLOUD_WAREHOUSES.md).
82
+
83
+ ---
84
+
85
+ ## Architecture
86
+
87
+ ```
88
+ ┌──────────────────────────────┐ ┌─────────────────────────────┐
89
+ │ React + TypeScript (Vite) │ HTTP │ Rust backend (Axum) │
90
+ │ Monaco · Tailwind · zustand │ ─────▶ │ REST API + WebSocket │
91
+ │ cells · panels · AI · jobs │ ◀───── │ routing, jobs, git, deploy │
92
+ └──────────────────────────────┘ WS └──────────────┬──────────────┘
93
+ │ stdin/stdout (JSON)
94
+ ┌───────▼────────┐
95
+ │ Persistent │
96
+ │ Python kernel │
97
+ │ (shared globals)│
98
+ └─────────────────┘
99
+ ```
100
+
101
+ - **Backend**: Rust (Axum + Tokio). Spawns one long-lived Python process and talks to
102
+ it over a line-framed JSON protocol; outputs are Jupyter-style MIME bundles.
103
+ - **Frontend**: React 18 + TypeScript + Vite, Monaco editor, Tailwind CSS.
104
+ - **Kernel**: a single `python` process with a shared namespace; SIGINT-interruptible,
105
+ restartable, with matplotlib (Agg) and rich preloaded.
106
+
107
+ ---
108
+
109
+ ## Getting started
110
+
111
+ ### Prerequisites
112
+ - **Rust** (stable) and **Node.js 18+**
113
+ - **Python 3.8+** on your `PATH` with `ipykernel`:
114
+ ```bash
115
+ pip install ipykernel pandas matplotlib rich duckdb
116
+ ```
117
+ - *(optional)* **Ollama** for local AI: https://ollama.com — then `ollama pull qwen2.5-coder`
118
+
119
+ ### Run in development
120
+ ```bash
121
+ # 1) backend (port 8000)
122
+ cargo run
123
+
124
+ # 2) frontend (port 5173, proxies /api and /ws to the backend)
125
+ cd frontend && npm install && npm run dev
126
+ ```
127
+ Open http://localhost:5173.
128
+
129
+ ### Configure AI (optional)
130
+ - **Local (Ollama)**: start Ollama and pick a model in the AI panel.
131
+ - **Claude/OpenAI**: set in the AI settings, or via env:
132
+ ```bash
133
+ export PRISMNOTE_AI_PROVIDER=claude # or openai / ollama
134
+ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY
135
+ ```
136
+ Settings saved in the UI persist to `~/.prismnote/ai_config.json`.
137
+
138
+ ---
139
+
140
+ ## Deploy
141
+
142
+ Open **Deploy to Cloud** (rocket icon) to copy/download ready-to-use artifacts:
143
+
144
+ ```bash
145
+ docker compose up -d # Docker
146
+ kubectl apply -f k8s.yaml # Kubernetes
147
+ fly launch --copy-config --now# Fly.io
148
+ ```
149
+
150
+ ---
151
+
152
+ ## Keyboard shortcuts
153
+
154
+ | Shortcut | Action |
155
+ |---|---|
156
+ | `⌘N` / `⌘O` / `⌘S` | New / Open / Save notebook |
157
+ | `⌘K` | Global search |
158
+ | `⇧⌘P` | Command palette |
159
+ | `⌘K` *(in a cell)* | AI edit |
160
+ | `⌘⇧⏎` | Run all cells |
161
+ | `⇧⏎` | Run cell |
162
+
163
+ ---
164
+
165
+ ## Repository layout
166
+
167
+ ```
168
+ crates/server/ Rust backend (api, kernel, jobs, db, ws, …)
169
+ frontend/ React app (components, hooks, api clients)
170
+ *.md Architecture & comparison docs
171
+ ```
172
+
173
+ Comparisons: [ZEPPELIN_COMPARISON.md](ZEPPELIN_COMPARISON.md) ·
174
+ [DATABRICKS_COMPARISON.md](DATABRICKS_COMPARISON.md) ·
175
+ [NOTEBOOK_COMPARISON_MATRIX.md](NOTEBOOK_COMPARISON_MATRIX.md)
176
+
177
+ ---
178
+
179
+ ## Roadmap
180
+
181
+ - Distributed compute (Spark) and a catalog/data browser.
182
+ - Real-time collaboration (live cursors/co-editing).
183
+ - Notebook parameters and multi-notebook job composition.
184
+
185
+ ---
186
+
187
+ ## License
188
+
189
+ MIT — see [LICENSE](LICENSE).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "prismnote"
7
- version = "0.3.1"
7
+ version = "0.4.0"
8
8
  description = "Modern, open-source Jupyter-compatible data science notebook with Rust performance"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -1,3 +1,3 @@
1
1
  """PrismNote - A modern data science notebook."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.4.0"
@@ -0,0 +1,243 @@
1
+ Metadata-Version: 2.4
2
+ Name: prismnote
3
+ Version: 0.4.0
4
+ Summary: Modern, open-source Jupyter-compatible data science notebook with Rust performance
5
+ Author-email: Georgi Mammen Mullassery <mullassery@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Mullassery/prismnote
8
+ Project-URL: Repository, https://github.com/Mullassery/prismnote
9
+ Project-URL: Documentation, https://github.com/Mullassery/prismnote#readme
10
+ Project-URL: Bug Tracker, https://github.com/Mullassery/prismnote/issues
11
+ Keywords: notebook,jupyter,data-science,sql,python,rust
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Topic :: Software Development :: Libraries
24
+ Classifier: Environment :: Web Environment
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: ipykernel>=6.0
29
+ Requires-Dist: jupyter>=1.0
30
+ Provides-Extra: sql
31
+ Requires-Dist: psycopg2-binary>=2.9; extra == "sql"
32
+ Requires-Dist: pymysql>=1.0; extra == "sql"
33
+ Provides-Extra: postgres
34
+ Requires-Dist: psycopg2-binary>=2.9; extra == "postgres"
35
+ Provides-Extra: mysql
36
+ Requires-Dist: pymysql>=1.0; extra == "mysql"
37
+ Provides-Extra: cloud
38
+ Requires-Dist: snowflake-connector-python>=3.0; extra == "cloud"
39
+ Requires-Dist: google-cloud-bigquery>=3.0; extra == "cloud"
40
+ Requires-Dist: amazon-redshift-python-driver>=1.0; extra == "cloud"
41
+ Requires-Dist: databricks-sql-connector>=1.0; extra == "cloud"
42
+ Provides-Extra: ai
43
+ Requires-Dist: anthropic>=0.7; extra == "ai"
44
+ Provides-Extra: openai
45
+ Requires-Dist: openai>=1.0; extra == "openai"
46
+ Provides-Extra: spark
47
+ Requires-Dist: pyspark>=3.0; extra == "spark"
48
+ Requires-Dist: pyarrow>=10; extra == "spark"
49
+ Provides-Extra: dev
50
+ Requires-Dist: pytest>=7.0; extra == "dev"
51
+ Requires-Dist: black>=22.0; extra == "dev"
52
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
53
+ Dynamic: license-file
54
+
55
+ <div align="center">
56
+
57
+ # ◆ PrismNote
58
+
59
+ **A fast, modern, open-source data-science notebook.**
60
+ Rust engine · React UI · local-first · AI-native.
61
+
62
+ **License:** MIT · **Status:** Beta (v0.4)
63
+
64
+ </div>
65
+
66
+ ---
67
+
68
+ ## Overview
69
+
70
+ PrismNote is a local-first alternative to Jupyter, Zeppelin, and Databricks notebooks.
71
+ It pairs a **Rust + Axum** backend and a **persistent Python kernel** with a modern,
72
+ **VS Code-style React** interface. Write Python and SQL, get rich output and live
73
+ charts, ask a local AI for help, schedule notebooks as jobs, manage git, and ship to
74
+ the cloud — all from one app that runs entirely on your machine.
75
+
76
+ - **Local-first & private** — runs on your machine; local AI via Ollama, no account required.
77
+ - **Jupyter-compatible** — native `.ipynb` format.
78
+ - **Batteries included** — kernel, SQL, charts, AI, jobs, git, deploy, search, terminal.
79
+
80
+ ---
81
+
82
+ ## Features
83
+
84
+ ### Notebook & execution
85
+ - **Persistent shared kernel** — variables, imports, and functions defined in one cell
86
+ are available in every later cell (true notebook semantics).
87
+ - **Per-cell interpreters (magics)**:
88
+ - `%python` (default) — runs in the shared kernel.
89
+ - `%sql` — in-process **DuckDB**; can query pandas DataFrames defined in other cells.
90
+ - `%sh` / `%bash` / `!cmd` — shell commands.
91
+ - `%md` / `%markdown` — rendered markdown.
92
+ - **Rich output** — text, HTML, matplotlib figures (`image/png`), and pandas DataFrames.
93
+ - **Chart switcher** — view any DataFrame as a **Table, Bar, or Line** chart.
94
+ - **Live streamed output** over WebSocket while a cell runs.
95
+ - **Interrupt** a running cell (Stop) and **restart** the kernel from the toolbar/menu.
96
+ - **Dynamic input widgets** — `prism.input / slider / select / checkbox` render controls
97
+ that re-run the cell when changed (Databricks `dbutils.widgets`-style).
98
+ - Pretty-printing enabled by default via `rich`.
99
+
100
+ ### AI assistance
101
+ Works with **local models via Ollama** (free, private, offline) or **Claude / OpenAI**.
102
+ - **⌘K in-cell edit** — describe a change, review a diff, accept or reject.
103
+ - **Fix with AI** — one click on an errored cell.
104
+ - **Explain** — a teaching-oriented explanation with a contextual tip.
105
+ - **Inline autocomplete** — ghost-text completions when Ollama is connected.
106
+ - **Teacher persona** — any model explains the "why" and suggests tips/tricks.
107
+ - **Agent panel** — Plan/Act assistant that can propose and apply cell edits.
108
+
109
+ ### Errors that help
110
+ - **Natural-language explanations** for common Python errors (NameError, KeyError,
111
+ ModuleNotFoundError, TypeError, ZeroDivisionError, SyntaxError, …).
112
+ - **In-editor markers** highlighting the offending **line and column**.
113
+ - Collapsible full traceback when you want the details.
114
+
115
+ ### Workflow: Jobs, Airflow, Git, Deploy
116
+ - **Jobs** — save a whole notebook and run it as a unit, **manual / interval / daily**,
117
+ with status and run history (Airflow-style).
118
+ - **Airflow** — a stable `run-by-name` trigger plus a **generated, ready-to-use DAG**.
119
+ - **Source control** — `init`, `clone`, `commit`, `push`, `pull`, `status` from the UI.
120
+ - **Cloud deploy** — generated `Dockerfile`, `docker-compose.yml`, `k8s.yaml`, and
121
+ `fly.toml`, each with its one-line deploy command.
122
+
123
+ ### Workspace & UX
124
+ - VS Code-style layout: activity rail, collapsible panels, status bar.
125
+ - **All panels collapsible**, each with **independent font +/-** controls.
126
+ - **Responsive** — side panels auto-collapse on narrow windows.
127
+ - **Global search (⌘K)**, **command palette (⇧⌘P)**, working top menus.
128
+ - Integrated **Terminal**, a **Python Console** (shares the kernel), and a **file browser**
129
+ (works in any browser via a server-side browser).
130
+ - Dark/light themes; `.ipynb` import/export.
131
+
132
+ ### Data connectivity
133
+ - DuckDB in-process SQL engine.
134
+ - Connection scaffolding for 8 cloud warehouses (Snowflake, BigQuery, Redshift,
135
+ Azure Synapse, Databricks, Athena, Presto, Trino) — see [CLOUD_WAREHOUSES.md](CLOUD_WAREHOUSES.md).
136
+
137
+ ---
138
+
139
+ ## Architecture
140
+
141
+ ```
142
+ ┌──────────────────────────────┐ ┌─────────────────────────────┐
143
+ │ React + TypeScript (Vite) │ HTTP │ Rust backend (Axum) │
144
+ │ Monaco · Tailwind · zustand │ ─────▶ │ REST API + WebSocket │
145
+ │ cells · panels · AI · jobs │ ◀───── │ routing, jobs, git, deploy │
146
+ └──────────────────────────────┘ WS └──────────────┬──────────────┘
147
+ │ stdin/stdout (JSON)
148
+ ┌───────▼────────┐
149
+ │ Persistent │
150
+ │ Python kernel │
151
+ │ (shared globals)│
152
+ └─────────────────┘
153
+ ```
154
+
155
+ - **Backend**: Rust (Axum + Tokio). Spawns one long-lived Python process and talks to
156
+ it over a line-framed JSON protocol; outputs are Jupyter-style MIME bundles.
157
+ - **Frontend**: React 18 + TypeScript + Vite, Monaco editor, Tailwind CSS.
158
+ - **Kernel**: a single `python` process with a shared namespace; SIGINT-interruptible,
159
+ restartable, with matplotlib (Agg) and rich preloaded.
160
+
161
+ ---
162
+
163
+ ## Getting started
164
+
165
+ ### Prerequisites
166
+ - **Rust** (stable) and **Node.js 18+**
167
+ - **Python 3.8+** on your `PATH` with `ipykernel`:
168
+ ```bash
169
+ pip install ipykernel pandas matplotlib rich duckdb
170
+ ```
171
+ - *(optional)* **Ollama** for local AI: https://ollama.com — then `ollama pull qwen2.5-coder`
172
+
173
+ ### Run in development
174
+ ```bash
175
+ # 1) backend (port 8000)
176
+ cargo run
177
+
178
+ # 2) frontend (port 5173, proxies /api and /ws to the backend)
179
+ cd frontend && npm install && npm run dev
180
+ ```
181
+ Open http://localhost:5173.
182
+
183
+ ### Configure AI (optional)
184
+ - **Local (Ollama)**: start Ollama and pick a model in the AI panel.
185
+ - **Claude/OpenAI**: set in the AI settings, or via env:
186
+ ```bash
187
+ export PRISMNOTE_AI_PROVIDER=claude # or openai / ollama
188
+ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY
189
+ ```
190
+ Settings saved in the UI persist to `~/.prismnote/ai_config.json`.
191
+
192
+ ---
193
+
194
+ ## Deploy
195
+
196
+ Open **Deploy to Cloud** (rocket icon) to copy/download ready-to-use artifacts:
197
+
198
+ ```bash
199
+ docker compose up -d # Docker
200
+ kubectl apply -f k8s.yaml # Kubernetes
201
+ fly launch --copy-config --now# Fly.io
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Keyboard shortcuts
207
+
208
+ | Shortcut | Action |
209
+ |---|---|
210
+ | `⌘N` / `⌘O` / `⌘S` | New / Open / Save notebook |
211
+ | `⌘K` | Global search |
212
+ | `⇧⌘P` | Command palette |
213
+ | `⌘K` *(in a cell)* | AI edit |
214
+ | `⌘⇧⏎` | Run all cells |
215
+ | `⇧⏎` | Run cell |
216
+
217
+ ---
218
+
219
+ ## Repository layout
220
+
221
+ ```
222
+ crates/server/ Rust backend (api, kernel, jobs, db, ws, …)
223
+ frontend/ React app (components, hooks, api clients)
224
+ *.md Architecture & comparison docs
225
+ ```
226
+
227
+ Comparisons: [ZEPPELIN_COMPARISON.md](ZEPPELIN_COMPARISON.md) ·
228
+ [DATABRICKS_COMPARISON.md](DATABRICKS_COMPARISON.md) ·
229
+ [NOTEBOOK_COMPARISON_MATRIX.md](NOTEBOOK_COMPARISON_MATRIX.md)
230
+
231
+ ---
232
+
233
+ ## Roadmap
234
+
235
+ - Distributed compute (Spark) and a catalog/data browser.
236
+ - Real-time collaboration (live cursors/co-editing).
237
+ - Notebook parameters and multi-notebook job composition.
238
+
239
+ ---
240
+
241
+ ## License
242
+
243
+ MIT — see [LICENSE](LICENSE).