myjs

myjs

A pure-Python JavaScript interpreter that runs JS code and DOM operations without Node.js or a browser.

🔗 Visit myjs
📁 Languages, SDKs & Dev Environments🗣️ English📅 September 6, 2026

Description

Sometimes you need to run a bit of JavaScript from inside a Python script — scrape a page that only renders via JS, execute a snippet from an API, or bridge two ecosystems — without pulling in a full Node.js install or a heavyweight browser automation stack. myjs is a JavaScript interpreter written entirely in Python that does exactly that: it parses and runs real JS code, including a fair chunk of modern syntax, directly inside your Python process.

It's a tree-walking JS evaluator with roughly 190 DOM constructors for headless HTML rendering, support for ES module syntax, async/await, generators, classes and destructuring, plus a built-in Promise/event-loop implementation (setTimeout, requestAnimationFrame). A two-way bridge lets JS code call back into Python (py.import()) and access host bindings like fs, path, http and fetch. It's early-stage (v0.0.3, alpha) and doesn't yet support Proxy, the with statement, or full ES5 getter/setter semantics.

💬 Our review

The short version: a neat pure-Python alternative to spinning up Node.js or Puppeteer just to execute some JavaScript — genuinely useful for lightweight scraping and Python/JS bridging, but it's alpha software with real gaps in language coverage.

Against PyExecJS (which just shells out to a real JS engine) or full browser automation via Selenium/Puppeteer, myjs's appeal is zero external dependencies — no Node, no browser binary, pure pip install. The trade-off is language completeness: no Proxy, no with, incomplete ES5 prototype behavior, so JS code relying on those will fail silently or error out. Worth trying for simple scraping and automation scripts where you control the JS being run; not a safe choice yet if you need full browser-engine JS compatibility.

💰 Pricing

Open SourceFree, open source, installable via pip.

📊 Global score

53Average
🌐Availability15/100Faible

1 language · 0 platform

📄Profile90/100Excellent

Profile completeness

🤖 AI-enriched data

💰 Pricing model
💳 Open Source

Gratuit, installable via pip.

👥 Target audiencePython developers needing lightweight JS execution without Node.js or a browser
🗣️ LanguagesEnglish
🌍 Target countriesGlobal
👍

Pros

Zéro dépendance Node/navigateur

JS moderne supporté (async/await, classes)

Pont bidirectionnel Python/JS

👎

Cons

Stade alpha (v0.0.3)

Pas de support Proxy/with

Conformité ES5 incomplète

❓ Frequently asked questions

What is myjs?
Is it free?
Can it replace a real browser for scraping?
Is it production-ready?
Is it worth the money compared to alternatives?
Which tool should you pick for your case?