prismnote 0.3.1__tar.gz → 0.4.1__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,252 @@
1
+ Metadata-Version: 2.4
2
+ Name: prismnote
3
+ Version: 0.4.1
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) · **PyPI:** [`prismnote`](https://pypi.org/project/prismnote/)
63
+
64
+ </div>
65
+
66
+ ---
67
+
68
+ ## Overview
69
+
70
+ PrismNote is a local-first alternative to Jupyter, Zeppelin, and Databricks notebooks.
71
+ A **Rust + Axum** backend drives a **persistent Python kernel**, and a modern,
72
+ **VS Code-style React** UI gives you Python + SQL, rich output and live charts, local
73
+ AI assistance, scheduled jobs, git, and generated cloud-deploy files — all on your machine.
74
+
75
+ - **Local-first & private** — runs locally; local AI via Ollama, no account required.
76
+ - **Jupyter-compatible** — native `.ipynb` import/export.
77
+ - **Batteries included** — kernel, SQL, charts, AI, jobs, git, deploy, search, terminal.
78
+
79
+ > **Status note:** PrismNote is **beta**. The notebook, kernel, AI, jobs, git, and
80
+ > charts are functional. Cloud-warehouse connectors are **scaffolding** (query results
81
+ > are currently stubbed), and deployment files are **generated templates** you review
82
+ > before shipping. See the [roadmap](#roadmap).
83
+
84
+ ---
85
+
86
+ ## Install & run
87
+
88
+ ### From source (recommended today)
89
+ Requires **Rust** (stable), **Node 18+**, and **Python 3.8+** on `PATH`:
90
+
91
+ ```bash
92
+ # Python runtime deps for the kernel (ipykernel is required; the rest enable
93
+ # rich output, %sql, and charts)
94
+ pip install ipykernel pandas matplotlib rich duckdb
95
+
96
+ # 1) backend — http://localhost:8000
97
+ cargo run
98
+
99
+ # 2) frontend — http://localhost:5173 (proxies /api and /ws to the backend)
100
+ cd frontend && npm install && npm run dev
101
+ ```
102
+ Open http://localhost:5173.
103
+
104
+ ### From PyPI
105
+ ```bash
106
+ pip install prismnote
107
+ prismnote
108
+ ```
109
+ The PyPI package is a thin launcher: on first run it downloads the prebuilt server
110
+ binary for your platform from the matching **GitHub Release** (`vX.Y.Z`). If a release
111
+ binary isn't published for your platform/version yet, use the from-source steps above.
112
+ (`pip install prismnote` succeeds regardless; only the prebuilt launch depends on a release.)
113
+
114
+ ### Enable AI (optional)
115
+ - **Local, free, private — Ollama:** install from https://ollama.com, then
116
+ `ollama pull qwen2.5-coder`. The UI talks to Ollama from the browser, so allow the
117
+ dev origin once:
118
+ ```bash
119
+ OLLAMA_ORIGINS=http://localhost:5173 ollama serve
120
+ ```
121
+ - **Claude / OpenAI:** set it in AI settings, or via env (persisted to
122
+ `~/.prismnote/ai_config.json`):
123
+ ```bash
124
+ export PRISMNOTE_AI_PROVIDER=claude # or openai / ollama
125
+ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Features
131
+
132
+ ### Notebook & execution
133
+ - **Persistent shared kernel** — variables/imports/functions from one cell are
134
+ available in later cells.
135
+ - **Per-cell interpreters (magics):** `%python` (default), `%sql` (in-process DuckDB;
136
+ can query DataFrames from other cells — needs `pip install duckdb`), `%sh` / `!cmd`
137
+ (shell), `%md` (rendered markdown).
138
+ - **Rich output** — text, HTML, matplotlib figures, and pandas DataFrames.
139
+ - **Chart switcher** — view any DataFrame as **Table / Bar / Line**.
140
+ - **Live streamed output** over WebSocket while a cell runs.
141
+ - **Interrupt** a running cell and **restart** the kernel.
142
+ - **Dynamic input widgets** — `prism.input / slider / select / checkbox` re-run the
143
+ cell when changed.
144
+
145
+ ### AI assistance
146
+ Local models via **Ollama**, or **Claude / OpenAI**.
147
+ - **In-cell AI edit** (diff accept/reject), **Fix with AI** on errors, **Explain**.
148
+ - **Inline autocomplete** (ghost text) when Ollama is connected.
149
+ - **Teacher persona** — explanations of the "why" plus a contextual tip.
150
+ - **Agent panel** — Plan/Act assistant that proposes and applies cell edits.
151
+
152
+ ### Errors that help
153
+ - **Natural-language explanations** for common Python errors.
154
+ - **In-editor markers** on the offending line/column, with a collapsible traceback.
155
+
156
+ ### Workflow
157
+ - **Jobs** — save a whole notebook and run it as a unit: **manual / interval / daily**,
158
+ with status + run history.
159
+ - **Airflow** — a stable `run-by-name` trigger and a **generated DAG**.
160
+ - **Source control** — `init`, `clone`, `commit`, `push`, `pull`, `status` from the UI.
161
+ - **Cloud deploy** — generates `Dockerfile`, `docker-compose.yml`, `k8s.yaml`, and
162
+ `fly.toml` (review before deploying).
163
+
164
+ ### Workspace & UX
165
+ - VS Code-style layout; **all panels collapsible**, each with **independent font +/-**.
166
+ - **Responsive** — side panels auto-collapse on narrow windows.
167
+ - Global **search**, **command palette**, integrated **terminal**, a **Python console**
168
+ (shares the kernel), and a **file browser** that works in any browser.
169
+ - Dark/light themes; `.ipynb` import/export.
170
+
171
+ ---
172
+
173
+ ## Architecture
174
+
175
+ ```
176
+ ┌──────────────────────────────┐ ┌─────────────────────────────┐
177
+ │ React + TypeScript (Vite) │ HTTP │ Rust backend (Axum) │
178
+ │ Monaco · Tailwind · zustand │ ─────▶ │ REST API + WebSocket │
179
+ │ cells · panels · AI · jobs │ ◀───── │ routing, jobs, git, deploy │
180
+ └──────────────────────────────┘ WS └──────────────┬──────────────┘
181
+ │ stdin/stdout (JSON)
182
+ ┌───────▼────────┐
183
+ │ Persistent │
184
+ │ Python kernel │
185
+ │ (shared globals)│
186
+ └─────────────────┘
187
+ ```
188
+
189
+ - **Backend** spawns one long-lived `python` process and talks to it over a
190
+ line-framed JSON protocol; outputs are Jupyter-style MIME bundles, streamed live.
191
+ - **Kernel** has a shared namespace, is SIGINT-interruptible and restartable, with
192
+ matplotlib (Agg) and `rich` preloaded.
193
+
194
+ ---
195
+
196
+ ## Keyboard shortcuts
197
+
198
+ All of these are wired:
199
+
200
+ | Shortcut | Action |
201
+ |---|---|
202
+ | `⌘N` / `⌘O` / `⌘S` | New / Open / Save notebook |
203
+ | `⌘K` | Global search *(in a focused cell, `⌘K` is AI edit instead)* |
204
+ | `⇧⌘P` | Command palette |
205
+ | `⌘,` | Settings |
206
+ | `⌘⇧↵` | Run all cells |
207
+ | `⇧↵` | Run the focused cell |
208
+
209
+ *(`⌘`/`Ctrl` depending on platform.)*
210
+
211
+ ---
212
+
213
+ ## Deploy
214
+
215
+ Open **Deploy to Cloud** to copy/download the generated artifacts, then:
216
+
217
+ ```bash
218
+ docker compose up -d # Docker
219
+ kubectl apply -f k8s.yaml # Kubernetes
220
+ fly launch --copy-config --now # Fly.io
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Repository layout
226
+
227
+ ```
228
+ crates/server/ Rust backend (api, kernel, jobs, db, ws, deploy, git…)
229
+ frontend/ React app (components, hooks, api clients)
230
+ python/ PyPI launcher package (prismnote)
231
+ *.md Architecture & comparison docs
232
+ ```
233
+
234
+ Comparisons: [ZEPPELIN_COMPARISON.md](ZEPPELIN_COMPARISON.md) ·
235
+ [DATABRICKS_COMPARISON.md](DATABRICKS_COMPARISON.md) ·
236
+ [NOTEBOOK_COMPARISON_MATRIX.md](NOTEBOOK_COMPARISON_MATRIX.md)
237
+
238
+ ---
239
+
240
+ ## Roadmap
241
+
242
+ - Functional cloud-warehouse query execution (currently scaffolded/stubbed).
243
+ - Prebuilt release binaries for all platforms (so `pip install` runs out of the box).
244
+ - Distributed compute (Spark) and a catalog/data browser.
245
+ - Real-time collaboration (live cursors / co-editing).
246
+ - Notebook parameters and multi-notebook job composition.
247
+
248
+ ---
249
+
250
+ ## License
251
+
252
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,198 @@
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) · **PyPI:** [`prismnote`](https://pypi.org/project/prismnote/)
9
+
10
+ </div>
11
+
12
+ ---
13
+
14
+ ## Overview
15
+
16
+ PrismNote is a local-first alternative to Jupyter, Zeppelin, and Databricks notebooks.
17
+ A **Rust + Axum** backend drives a **persistent Python kernel**, and a modern,
18
+ **VS Code-style React** UI gives you Python + SQL, rich output and live charts, local
19
+ AI assistance, scheduled jobs, git, and generated cloud-deploy files — all on your machine.
20
+
21
+ - **Local-first & private** — runs locally; local AI via Ollama, no account required.
22
+ - **Jupyter-compatible** — native `.ipynb` import/export.
23
+ - **Batteries included** — kernel, SQL, charts, AI, jobs, git, deploy, search, terminal.
24
+
25
+ > **Status note:** PrismNote is **beta**. The notebook, kernel, AI, jobs, git, and
26
+ > charts are functional. Cloud-warehouse connectors are **scaffolding** (query results
27
+ > are currently stubbed), and deployment files are **generated templates** you review
28
+ > before shipping. See the [roadmap](#roadmap).
29
+
30
+ ---
31
+
32
+ ## Install & run
33
+
34
+ ### From source (recommended today)
35
+ Requires **Rust** (stable), **Node 18+**, and **Python 3.8+** on `PATH`:
36
+
37
+ ```bash
38
+ # Python runtime deps for the kernel (ipykernel is required; the rest enable
39
+ # rich output, %sql, and charts)
40
+ pip install ipykernel pandas matplotlib rich duckdb
41
+
42
+ # 1) backend — http://localhost:8000
43
+ cargo run
44
+
45
+ # 2) frontend — http://localhost:5173 (proxies /api and /ws to the backend)
46
+ cd frontend && npm install && npm run dev
47
+ ```
48
+ Open http://localhost:5173.
49
+
50
+ ### From PyPI
51
+ ```bash
52
+ pip install prismnote
53
+ prismnote
54
+ ```
55
+ The PyPI package is a thin launcher: on first run it downloads the prebuilt server
56
+ binary for your platform from the matching **GitHub Release** (`vX.Y.Z`). If a release
57
+ binary isn't published for your platform/version yet, use the from-source steps above.
58
+ (`pip install prismnote` succeeds regardless; only the prebuilt launch depends on a release.)
59
+
60
+ ### Enable AI (optional)
61
+ - **Local, free, private — Ollama:** install from https://ollama.com, then
62
+ `ollama pull qwen2.5-coder`. The UI talks to Ollama from the browser, so allow the
63
+ dev origin once:
64
+ ```bash
65
+ OLLAMA_ORIGINS=http://localhost:5173 ollama serve
66
+ ```
67
+ - **Claude / OpenAI:** set it in AI settings, or via env (persisted to
68
+ `~/.prismnote/ai_config.json`):
69
+ ```bash
70
+ export PRISMNOTE_AI_PROVIDER=claude # or openai / ollama
71
+ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Features
77
+
78
+ ### Notebook & execution
79
+ - **Persistent shared kernel** — variables/imports/functions from one cell are
80
+ available in later cells.
81
+ - **Per-cell interpreters (magics):** `%python` (default), `%sql` (in-process DuckDB;
82
+ can query DataFrames from other cells — needs `pip install duckdb`), `%sh` / `!cmd`
83
+ (shell), `%md` (rendered markdown).
84
+ - **Rich output** — text, HTML, matplotlib figures, and pandas DataFrames.
85
+ - **Chart switcher** — view any DataFrame as **Table / Bar / Line**.
86
+ - **Live streamed output** over WebSocket while a cell runs.
87
+ - **Interrupt** a running cell and **restart** the kernel.
88
+ - **Dynamic input widgets** — `prism.input / slider / select / checkbox` re-run the
89
+ cell when changed.
90
+
91
+ ### AI assistance
92
+ Local models via **Ollama**, or **Claude / OpenAI**.
93
+ - **In-cell AI edit** (diff accept/reject), **Fix with AI** on errors, **Explain**.
94
+ - **Inline autocomplete** (ghost text) when Ollama is connected.
95
+ - **Teacher persona** — explanations of the "why" plus a contextual tip.
96
+ - **Agent panel** — Plan/Act assistant that proposes and applies cell edits.
97
+
98
+ ### Errors that help
99
+ - **Natural-language explanations** for common Python errors.
100
+ - **In-editor markers** on the offending line/column, with a collapsible traceback.
101
+
102
+ ### Workflow
103
+ - **Jobs** — save a whole notebook and run it as a unit: **manual / interval / daily**,
104
+ with status + run history.
105
+ - **Airflow** — a stable `run-by-name` trigger and a **generated DAG**.
106
+ - **Source control** — `init`, `clone`, `commit`, `push`, `pull`, `status` from the UI.
107
+ - **Cloud deploy** — generates `Dockerfile`, `docker-compose.yml`, `k8s.yaml`, and
108
+ `fly.toml` (review before deploying).
109
+
110
+ ### Workspace & UX
111
+ - VS Code-style layout; **all panels collapsible**, each with **independent font +/-**.
112
+ - **Responsive** — side panels auto-collapse on narrow windows.
113
+ - Global **search**, **command palette**, integrated **terminal**, a **Python console**
114
+ (shares the kernel), and a **file browser** that works in any browser.
115
+ - Dark/light themes; `.ipynb` import/export.
116
+
117
+ ---
118
+
119
+ ## Architecture
120
+
121
+ ```
122
+ ┌──────────────────────────────┐ ┌─────────────────────────────┐
123
+ │ React + TypeScript (Vite) │ HTTP │ Rust backend (Axum) │
124
+ │ Monaco · Tailwind · zustand │ ─────▶ │ REST API + WebSocket │
125
+ │ cells · panels · AI · jobs │ ◀───── │ routing, jobs, git, deploy │
126
+ └──────────────────────────────┘ WS └──────────────┬──────────────┘
127
+ │ stdin/stdout (JSON)
128
+ ┌───────▼────────┐
129
+ │ Persistent │
130
+ │ Python kernel │
131
+ │ (shared globals)│
132
+ └─────────────────┘
133
+ ```
134
+
135
+ - **Backend** spawns one long-lived `python` process and talks to it over a
136
+ line-framed JSON protocol; outputs are Jupyter-style MIME bundles, streamed live.
137
+ - **Kernel** has a shared namespace, is SIGINT-interruptible and restartable, with
138
+ matplotlib (Agg) and `rich` preloaded.
139
+
140
+ ---
141
+
142
+ ## Keyboard shortcuts
143
+
144
+ All of these are wired:
145
+
146
+ | Shortcut | Action |
147
+ |---|---|
148
+ | `⌘N` / `⌘O` / `⌘S` | New / Open / Save notebook |
149
+ | `⌘K` | Global search *(in a focused cell, `⌘K` is AI edit instead)* |
150
+ | `⇧⌘P` | Command palette |
151
+ | `⌘,` | Settings |
152
+ | `⌘⇧↵` | Run all cells |
153
+ | `⇧↵` | Run the focused cell |
154
+
155
+ *(`⌘`/`Ctrl` depending on platform.)*
156
+
157
+ ---
158
+
159
+ ## Deploy
160
+
161
+ Open **Deploy to Cloud** to copy/download the generated artifacts, then:
162
+
163
+ ```bash
164
+ docker compose up -d # Docker
165
+ kubectl apply -f k8s.yaml # Kubernetes
166
+ fly launch --copy-config --now # Fly.io
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Repository layout
172
+
173
+ ```
174
+ crates/server/ Rust backend (api, kernel, jobs, db, ws, deploy, git…)
175
+ frontend/ React app (components, hooks, api clients)
176
+ python/ PyPI launcher package (prismnote)
177
+ *.md Architecture & comparison docs
178
+ ```
179
+
180
+ Comparisons: [ZEPPELIN_COMPARISON.md](ZEPPELIN_COMPARISON.md) ·
181
+ [DATABRICKS_COMPARISON.md](DATABRICKS_COMPARISON.md) ·
182
+ [NOTEBOOK_COMPARISON_MATRIX.md](NOTEBOOK_COMPARISON_MATRIX.md)
183
+
184
+ ---
185
+
186
+ ## Roadmap
187
+
188
+ - Functional cloud-warehouse query execution (currently scaffolded/stubbed).
189
+ - Prebuilt release binaries for all platforms (so `pip install` runs out of the box).
190
+ - Distributed compute (Spark) and a catalog/data browser.
191
+ - Real-time collaboration (live cursors / co-editing).
192
+ - Notebook parameters and multi-notebook job composition.
193
+
194
+ ---
195
+
196
+ ## License
197
+
198
+ 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.1"
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.1"
@@ -15,7 +15,7 @@ import platform
15
15
  import urllib.request
16
16
  from pathlib import Path
17
17
 
18
- __version__ = "0.4.0"
18
+ __version__ = "0.4.1"
19
19
 
20
20
  GITHUB_REPO = "Mullassery/prismnote"
21
21
  CACHE_DIR = Path.home() / ".prismnote" / "bin"