All-in-one Python Language Server + Monaco Editor bundle. Run Python LSP (Pyright) directly in the browser or on a Node.js backend with zero setup.
MeridiaPy ships everything you need — Monaco Editor, vscode-languageclient, Pyright, JSON-RPC bridge — so you can get completions, hovers, diagnostics, and workspace support in just a few lines of code.
- 🖥 Works in the browser (Monaco + Python LSP preconfigured)
- 📦 Ships with all dependencies included — no extra installs
- ⚡ Simple APIs:
MeridiaPy,runServer - 🔧 Powered by Pyright,
monaco-languageclient, andvscode-ws-jsonrpc - 🧪 Tested with Vite and Electron
npm install meridia-py
# or
yarn add meridia-pySee a working example in examples/browser.
import { MeridiaPy } from "meridia-py";
async function startPyEditor() {
const container = document.getElementById("editor-container");
if (!container) throw new Error("Editor container not found");
const workspaceUrl = "file:///workspace";
const editorApp = new MeridiaPy(container, workspaceUrl, 3000);
const editor = await editorApp.createEditor();
const mainPyModel = await editorApp.createModel(
"/workspace/main.py",
`print("Hello, Pyright with Meridia!")`
);
editorApp.setModel(mainPyModel);
}
startPyEditor().catch(console.error);<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>MeridiaPy Example</title>
<style>
#editor-container {
width: 100%;
height: 90vh;
border: 1px solid #ccc;
}
</style>
</head>
<body>
<div id="editor-container"></div>
<script type="module" src="./editor.ts"></script>
</body>
</html>Run with:
npx viteSee a working example in examples/server.
import { runServer } from "meridia-py/server";
runServer(30000); // Pyright LSP on ws://localhost:30000/pyrightThe browser client connects via WebSocket automatically.
packages/
code/
python/
client.ts # Browser/Node client (Monaco + LSP)
server.ts # Node.js Pyright server
utils/
fs-utils.ts # helper utilities
dist/ # compiled output
examples/ # working usage demos
The repository contains runnable examples inside the examples/ directory:
- examples/browser → Run Monaco + Python in a browser with Vite.
- examples/electron → Run Monaco + Python in electron.
You can clone the repo and try:
git clone https://github.com/MeridiaByMNovus/meridia-py.git
cd meridia-py/examples/browser
npm install
npm run devPull requests are welcome! Please open an issue first to discuss changes or new ideas.
MIT © [MNovus]