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