skillfed

pyodide-lock

Tooling to manage the `pyodide-lock.json` file

pyodide-lock v0.2.0 76.7K downloads/30d#14,602 on PyPI8
Permissive license Active released

What it is and what it does

pyodide-lock is a tooling library for managing pyodide-lock.json files, which specify the versions of Python packages that are auto-loaded in Pyodide-based applications (including JupyterLite and PyScript). Instead of requiring explicit micropip installation at runtime, packages listed in the lock file are loaded automatically when the application starts. The library provides a Python API to read, modify, and write these lock files programmatically.

The package depends on attrs and cattrs for data structure handling and serialization. It is actively maintained and has low installation friction as a pure-Python wheel. However, it is pre-1.0 and explicitly warns that its API may change substantially before the 0.1 release, so early adopters should be prepared for potential breaking changes.

Use it for:

  • Programmatically update package versions in a pyodide-lock.json file as part of a CI/CD pipeline.
  • Generate or regenerate lock files for JupyterLite or PyScript deployments from a Python script.
  • Parse and inspect the current package manifest in an existing pyodide-lock.json to audit dependencies.
  • Automate dependency management for Pyodide applications without manual JSON editing.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses, modifies, and writes pyodide-lock.json files that specify which Python packages are auto-loaded in Pyodide, JupyterLite, and PyScript applications.

Yes, if you are building or maintaining Pyodide, JupyterLite, or PyScript applications and need to manage lock files programmatically. The low install friction and active maintenance are positives. However, be aware that the pre-1.0 API is explicitly unstable and may break before the 0.1 release; pin your version or monitor releases closely if you adopt it early.

Install

pyodide-lock on PyPI

pip

pip install pyodide-lock

uv

uv add pyodide-lock

poetry

poetry add pyodide-lock

Installing pyodide-lock

Before you install

Low friction: pure Python wheel with only two lightweight dependencies (attrs and cattrs). Actively maintained with a recent release; however, the package is pre-1.0 and explicitly warns that its API may change substantially before the 0.1 release.

License in practice

BSD-3-Clause license (permissive); safe for commercial and proprietary use with standard attribution requirements.

Quickstart

pip install pyodide-lock

from pyodide_lock import PyodideLockSpec

lock_spec = PyodideLockSpec.from_json("pyodide-lock.json")
# Make changes to lock_spec
lock_spec.to_json("pyodide-lock.json")

Requires Python 3.12 or later.

Verify before relying

  • Whether the API stability warning (may change before 0.1 release) reflects ongoing active development or is outdated given the current 0.2.0 version.
  • Whether PyodideLockSpec is the primary public API or if there are other entry points documented.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.12)
Install friction low — pure-Python wheel
Runtime dependencies 2 — attrs, cattrs
Maintenance actively maintained — 21 days since the last release
Last repo commit
First released
Downloads 76,675/month — #14,602 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyodide_lock-0.2.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

pyodide lock file managementpyodide-lock.json toolingpython package locking for pyodidemanage pyodide dependenciespyodide package versioninglock file parser pythonpyodide application packaging
pyodidelock-file-managementwasm-python

More Build Tools packages