--- id: esprima version: "4.0.1" license: BSD License license_treatment: permissive maintenance: abandoned --- # esprima — ECMAScript parsing infrastructure for multipurpose analysis in Python License: permissive · Maintenance: abandoned · Downloads: 484.4K/mo ## What it is and what it does Esprima is a Python port of the original JavaScript ECMAScript parser, providing both tokenization (lexical analysis) and parsing (syntactic analysis) to generate abstract syntax trees conforming to the ESTree standard. It supports ECMAScript 2017 and includes experimental JSX support. The parser can optionally track node locations in the source code. The package has no runtime dependencies and is a pure Python implementation. However, it is abandoned—the last release was in August 2018 and the last repository commit in March 2023—meaning no new features, bug fixes, or security updates will be issued. It was originally designed for Python 2.7 and Python 3.3–3.6, and its behavior on modern Python versions is untested. Use it for: - Build static analysis tools that inspect JavaScript code structure without executing it. - Generate code transformations or refactoring scripts by manipulating the parsed AST. - Implement linters or style checkers that need to understand JavaScript syntax. - Extract metadata from JavaScript files (e.g., function names, variable declarations). - Transpile or analyze React JSX syntax (experimental support). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Esprima parses ECMAScript (JavaScript) source code into an abstract syntax tree, supporting tokenization and full syntactic analysis of JavaScript programs. No. The package is abandoned with no maintenance since 2018 and untested on modern Python versions. If you need JavaScript parsing in Python, prefer an actively maintained alternative. Install only if you are maintaining legacy code that already depends on esprima and cannot migrate. ## Install pip install esprima uv add esprima poetry add esprima ## Installing esprima Before you install: Installation requires a source build (high friction). The package is abandoned—last release was 2018-08-24 and last commit 2023-03-01—so expect no maintenance or security updates going forward. License in practice: BSD License (permissive) allows commercial and private use with minimal restrictions, though you should retain license notices in derivative works. Quickstart: pip install esprima import esprima program = 'const answer = 42' tokens = esprima.tokenize(program) ast = esprima.parseScript(program) Classifiers indicate Python 2.7 and Python 3.3–3.6 support; compatibility with modern Python versions (3.8+) is unspecified and untested. Verify before relying: - Whether the package works reliably on Python versions newer than 3.6, given no recent maintenance. - Whether JSX support is production-ready or experimental only. - Current state of the Python port relative to the original JavaScript Esprima—feature parity and bug-fix status. ## Package facts - License: BSD License (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 484.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags javascript parser python, ecmascript ast generator, js code tokenizer, javascript syntax tree, ecmascript 2017 parser, jsx parser python, javascript lexical analysis, parser, javascript, ast [View on SkillFed](https://skillfed.io/packages/esprima) · [View on PyPI](https://pypi.org/project/esprima/)