--- id: pyjsparser version: "2.7.1" license: MIT license_treatment: permissive maintenance: abandoned --- # pyjsparser — Fast javascript parser (based on esprima.js) License: permissive · Maintenance: abandoned · Downloads: 694.7K/mo ## What it is and what it does pyjsparser is a Python port of the esprima.js JavaScript parser that converts JavaScript source code into an abstract syntax tree. It was designed to be fast and comprehensible, translating esprima's logic directly to Python rather than wrapping a JavaScript engine. The parser handles ECMAScript 5.1 fully and supports parts of ECMAScript 6. It produces AST output compatible with esprima's format, making it useful for static analysis, code transformation, or tooling that needs to understand JavaScript structure without executing it. However, the package has not been maintained since 2019, so it will not evolve with newer JavaScript standards or receive compatibility updates for recent Python versions. Use it for: - Static analysis of JavaScript code to extract variable names, function definitions, or code structure - Building linters or code quality tools that need to understand JavaScript syntax without running it - Transforming or transpiling JavaScript code by manipulating its AST representation - Analyzing third-party JavaScript libraries to understand their API surface or dependencies ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses JavaScript source code into an abstract syntax tree (AST) compatible with esprima.js, supporting ECMAScript 5.1 and parts of ECMAScript 6. Yes, if you need to parse ECMAScript 5.1 code and can accept an unmaintained package. The parser has no dependencies, installs easily, and carries no known vulnerabilities. However, avoid it for modern JavaScript projects that rely on ES6+ features, and be aware that bugs or Python compatibility issues will not be fixed. Consider whether a maintained alternative better suits your timeline. ## Install pip install pyjsparser uv add pyjsparser poetry add pyjsparser ## Installing pyjsparser Before you install: Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 2019-04-21 and last commit 2022-04-20—so it will not receive bug fixes or updates for newer JavaScript features or Python versions. License in practice: Licensed under MIT (permissive), so you may use, modify, and distribute it freely with minimal restrictions, though you must include the license notice. Quickstart: pip install pyjsparser from pyjsparser import parse ast = parse('var $ = "Hello!"') print(ast) Verify before relying: - Whether the parser correctly handles all ECMAScript 6 features it claims to support, or only a subset - Compatibility with modern Python versions given the package's abandonment since 2019 - Performance claim of '100k characters per second' on current hardware and Python versions ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 694.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags javascript parser python, parse javascript code ast, ecmascript parser, js to ast conversion, esprima python, javascript syntax tree, ast-parsing, javascript-analysis [View on SkillFed](https://skillfed.io/packages/pyjsparser) · [View on PyPI](https://pypi.org/project/pyjsparser/)