$npx skillfedfor your agent

esprima2

high-performance javascript parser, tokenizer and lexical analyser

With conditionsPyPI Python ModulesReleased Apr 2026262.9K downloads / moBSD-2-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — esprima2-6.0.0-py3-none-any.whl
v6.0.0 · released 2026-04-22 · Python >=3.10

Yes, if you need to parse modern JavaScript from Python. The package is actively maintained, has no dependencies, installs easily, carries a permissive license, and supports current ECMAScript syntax. It is relatively new (first release July 2025) but shows active development and reasonable test coverage. No known security vulnerabilities. The main caveat is that JSX support is marked experimental, so verify it meets your needs if you rely on that feature.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Repository is active with a recent commit on 2026-04-22 and 71 stars; first release was 2025-07-29, so it is relatively new but under active maintenance.

License · maintenance · safety

BSD-2-Clause (permissive) — BSD-2-Clause is permissive; you may use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.

last release 2026-04-22 (114 days) · last repo commit 2026-04-22 · 71 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 262,895 downloads/mo, #8,366 on PyPI

Verify before relying

pip install esprima2

import esprima
program = 'const answer = 42'
tokens = esprima.tokenize(program)
ast = esprima.parseScript(program)
  • Whether JSX support is production-ready or remains experimental in practice.
  • Performance characteristics when parsing large or complex JavaScript files.
  • Completeness of ECMA 2025 syntax coverage beyond the stated feature claim.
Same gist for agents: .md · .json

What it is and what it does

esprima2 is a JavaScript parser written in Python that converts JavaScript source code into an abstract syntax tree (AST) or token stream. It supports syntax up to ECMA 2025 and is built on a faithful Python port of the original esprima library, extended with modern ECMAScript features that the upstream projects no longer maintain. The parser produces output in the ESTree standardized format, making it compatible with tools and libraries that expect that structure.

You use it to analyze or manipulate JavaScript code from Python—tokenizing to extract individual language elements, or parsing to build a complete syntax tree for traversal, transformation, or code generation. It includes experimental JSX support and optional source location tracking. The package is backed by roughly 1500 unit tests and requires Python 3.10 or later.

Use it for

  • Static analysis of JavaScript code to detect patterns, security issues, or code quality problems.
  • Building a JavaScript-to-Python transpiler or code generator that needs to understand JS syntax.
  • Extracting metadata from JavaScript files (function names, imports, dependencies) for tooling.
  • Linting or formatting JavaScript code by walking and inspecting its AST.
  • Embedding JavaScript parsing in a Python application that processes user-supplied JS code.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to parse modern JavaScript from Python.

The package is actively maintained, has no dependencies, installs easily, carries a permissive license, and supports current ECMAScript syntax. It is relatively new (first release July 2025) but shows active development and reasonable test coverage. No known security vulnerabilities. The main caveat is that JSX support is marked experimental, so verify it meets your needs if you rely on that feature.

Install

esprima2 on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Repository is active with a recent commit on 2026-04-22 and 71 stars; first release was 2025-07-29, so it is relatively new but under active maintenance.

Requires Python 3.10 or later.

License in practice

BSD-2-Clause is permissive; you may use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.

Quickstart

pip install esprima2

import esprima
program = 'const answer = 42'
tokens = esprima.tokenize(program)
ast = esprima.parseScript(program)

Verify before relying

  • Whether JSX support is production-ready or remains experimental in practice.
  • Performance characteristics when parsing large or complex JavaScript files.
  • Completeness of ECMA 2025 syntax coverage beyond the stated feature claim.

Package facts

LicenseBSD-2-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 114 days since the last release
Last repo commit
First released
Downloads262,895 / month, #8,366 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Code GeneratorsTopic :: Software Development :: CompilersTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: General

Evidence: esprima2-6.0.0-py3-none-any.whl

Tags

Capabilities
javascript parser pythonecmascript ast generatorjs tokenizer pythonjavascript syntax treeecma 2025 parserjavascript lexical analysisast from javascript code
Topics
javascript-parsingast-generationcode-analysis
PyPI keywords
esprimaecmascriptjavascriptparserast

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “js tokenizer python”

  • esprima2Parses and tokenizes JavaScript code up to ECMA 2025 syntax,…
  • esprimaEsprima parses ECMAScript (JavaScript) source code into an abstract…
  • pytorch-tokenizersProvides C++ implementations of multiple tokenizers (SentencePiece,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also esprima · pyjsparser · tree-sitter-javascript · Js2Py-3.13 · Js2Py · tree-sitter-typescript · luaparser · tree-sitter-regex · regress · hogql-parser