Metadata-Version: 2.4
Name: prismnote
Version: 1.11.0
Summary: Data science notebook with support for 15+ programming languages, SQL execution across 9+ databases, multi-terminal splits, and intelligent code assistance.
Author-email: Georgi Mammen Mullassery <mullassery@gmail.com>
Maintainer-email: Georgi Mammen Mullassery <mullassery@gmail.com>
License: Proprietary
Project-URL: Homepage, https://github.com/Mullassery/prismnote
Project-URL: Repository, https://github.com/Mullassery/prismnote
Project-URL: Documentation, https://github.com/Mullassery/prismnote#readme
Project-URL: Bug Tracker, https://github.com/Mullassery/prismnote/issues
Project-URL: Changelog, https://github.com/Mullassery/prismnote/releases
Project-URL: Source Code, https://github.com/Mullassery/prismnote/tree/main
Project-URL: Discussions, https://github.com/Mullassery/prismnote/discussions
Keywords: jupyter,notebook,data-science,sql-notebook,data-analytics,python-notebook,spark,bigquery,snowflake,redshift,postgres,mysql,cloud-warehouse,ide,code-editor,rust-performance,react-ui,web-app,collaboration,data-exploration,exploratory-analysis,analytics-platform,query-builder,ai-assistant,ml-development
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Shells
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Office/Business :: News/Diary
Classifier: Environment :: Web Environment
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipykernel<7.0,>=6.0
Requires-Dist: jupyter<2.0,>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Provides-Extra: sql
Requires-Dist: duckdb==0.9; extra == "sql"
Requires-Dist: pg8000==1.30; extra == "sql"
Requires-Dist: pymysql==1.0; extra == "sql"
Provides-Extra: postgres
Requires-Dist: pg8000==1.30; extra == "postgres"
Provides-Extra: mysql
Requires-Dist: pymysql==1.0; extra == "mysql"
Provides-Extra: duckdb
Requires-Dist: duckdb==0.9; extra == "duckdb"
Provides-Extra: cloud
Requires-Dist: snowflake-connector-python[pandas]==3.0; extra == "cloud"
Requires-Dist: google-cloud-bigquery==3.0; extra == "cloud"
Requires-Dist: db-dtypes==1.0; extra == "cloud"
Requires-Dist: redshift_connector==2.0; extra == "cloud"
Requires-Dist: databricks-sql-connector==2.0; extra == "cloud"
Requires-Dist: pyathena==3.0; extra == "cloud"
Requires-Dist: trino==0.328; extra == "cloud"
Provides-Extra: ai
Requires-Dist: anthropic==0.7; extra == "ai"
Provides-Extra: openai
Requires-Dist: openai==1.0; extra == "openai"
Provides-Extra: spark
Requires-Dist: pyspark==3.0; extra == "spark"
Requires-Dist: pyarrow==10; extra == "spark"
Dynamic: license-file

# PrismNote

A Jupyter-compatible data-science notebook with a Rust backend and a React
frontend: real local SQL execution, a real sandboxed code-execution engine,
and connectors for cloud data warehouses.

[![CI](https://github.com/Mullassery/PrismNote/actions/workflows/ci.yml/badge.svg)](https://github.com/Mullassery/PrismNote/actions/workflows/ci.yml)

## What this is

- **Backend:** Rust (Axum). Serves the API, runs SQL against local and
  remote databases, and launches Docker containers for sandboxed code
  execution.
- **Frontend:** React + TypeScript (Vite). Notebook UI, SQL cells, schema
  explorer, results grid.
- The release binary embeds the built frontend, so `prismnote` is a single
  executable that serves the whole app.

## Install

```bash
pip install prismnote
prismnote
```

`pip install` installs a thin Python launcher (`python/`) — on first run it
downloads the matching prebuilt server binary from
[GitHub Releases](https://github.com/Mullassery/PrismNote/releases) and
execs it. As of this version, a prebuilt binary is published for **macOS
(Apple Silicon) only**; other platforms need to build from source (see
[Building](#building) below) until more platform binaries are uploaded.

## SQL execution

SQL cells run against real databases — there is no mocked or placeholder
query path:

| Backend | Status |
|---|---|
| SQLite | Real, embedded (via `sqlx`), no server required |
| DuckDB | Real, embedded (bundled DuckDB, compiled from source), no server required |
| PostgreSQL | Real, via `sqlx`; requires a reachable Postgres server |
| MySQL | Real, via `sqlx`; requires a reachable MySQL server |

All four are covered by integration tests that run genuine
`CREATE TABLE` / `INSERT` / `SELECT` round trips
(`crates/server/src/db/executor.rs`). SQLite and DuckDB tests always run.
The Postgres/MySQL tests connect to a real server and skip (rather than
fail) when one isn't reachable — point them at a running server with
`PRISMNOTE_TEST_PG_PORT` / `PRISMNOTE_TEST_MYSQL_PORT`.

MongoDB is not implemented; connecting to it returns an explicit error
rather than a fake success.

## Sandboxed code execution

`docker_executor.rs` runs untrusted code in a brand-new, disposable Docker
container per execution (`docker run --rm`):

- No network access by default (`--network=none`)
- Memory, CPU, and process-count limits enforced per run
- A wall-clock timeout that force-kills and cleans up the container
- Real stdout/stderr/exit-code capture

Requires a working Docker installation. Supported languages: Python,
Bash/shell, JavaScript (Node), Ruby.

## Cloud warehouse connectors

Real connection + query execution for Snowflake, BigQuery, Redshift, Azure
Synapse, Databricks, Athena, Presto, and Trino (`crates/server/src/cloud_warehouse/`).
AWS-signed requests (Athena, Redshift) use a real SigV4 implementation.

## Other integrations

All real API calls, not placeholders:

| Integration | What's real |
|---|---|
| Cloud storage | S3 (SigV4), GCS (service-account JWT), Azure Blob (Shared Key signing), Google Drive (OAuth) — upload/download/list/delete |
| dbt | Shells out to the real `dbt` CLI; parses its `manifest.json`/`run_results.json` |
| GitHub | Real Contents API for notebook backup/sync |
| Airflow | Real REST API v1 (list/trigger DAGs, run status, tasks). DAG *creation* writes a file to a configured local DAGs folder, since Airflow's API has no DAG-creation endpoint |
| Kubernetes | Real `kubectl apply`/`get pods`/`scale` |
| RunPod | Real GraphQL API for training-instance lifecycle and serverless endpoint deployment |

Two data-quality-scoring code paths (`api::get_quality_score`,
`lineage::data_quality_score`) are the one area still not wired to real
execution — they'd need an assertion-storage and table-to-queryable-data
layer that doesn't exist yet, rather than something fakeable in isolation.

## Building

```bash
git clone https://github.com/Mullassery/PrismNote.git
cd PrismNote
make build
```

`make build` builds the frontend first and embeds it into the release
binary — this is the only build path that produces a binary that actually
serves the UI. Running `cargo build --release` directly will build a
backend with no frontend assets. The binary is written to
`target/release/prismnote`.

Requirements: Rust (stable), Node 20.19+ (required by Vite 8), and Docker if
you want sandboxed code execution or want to test the container-management
endpoints.

### Development

```bash
# Terminal 1: backend on http://localhost:8000
cargo run

# Terminal 2: frontend dev server on http://localhost:5173
cd frontend && npm install && npm run dev
```

### Tests

```bash
cargo test --workspace --release   # backend
cd frontend && npm test            # frontend (vitest)
```

### Configuration

Everything runs with no environment variables set — Google Sign-In and AI
features (code explain/fix/complete, NL-to-SQL, RunPod fine-tuning) are
just disabled until configured. Copy [`.env.example`](.env.example) to
`.env` and fill in what you need; see the comments in that file for which
variables are required together (e.g. `PRISMNOTE_AI_PROVIDER=claude` needs
`ANTHROPIC_API_KEY`) and which are backend-only vs. frontend (`VITE_`-prefixed).

## Project layout

```
crates/server/   Rust backend: API, SQL executors, Docker sandbox, cloud warehouse connectors
frontend/        React app (components, hooks, API clients)
python/          PyPI launcher package
docs/            architecture notes and screenshots
```

## License

Proprietary — free to use with explicit attribution. See [LICENSE](LICENSE)
for the full terms.
