pyodide-lock
Tooling to manage the `pyodide-lock.json` file
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-lockuv
uv add pyodide-lockpoetry
poetry add pyodide-lockInstalling 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
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
jupyterlite-pyodide-kernelProvides a Python kernel for JupyterLite that…
permissive · top 15,000 on PyPI
lockfileProvides a platform-independent file locking…
permissive · top 1,000 on PyPI
zc.lockfileProvides portable inter-process locks…
unclear · top 5,000 on PyPI
pyodide-pyProvides core interpreter functionality for…
copyleft · top 15,000 on PyPI
redlock-pyImplements Redis-based distributed locks using…
permissive · top 15,000 on PyPI
python-dynamodb-lockProvides distributed locking on top of DynamoDB…
permissive · top 15,000 on PyPI
fastenersProvides cross-platform locks for synchronizing…
permissive · top 5,000 on PyPI
pyodide-cliA command-line interface for the Pyodide…
copyleft · top 15,000 on PyPI
PyMySQLLockProvides distributed locking primitives backed…
permissive · top 15,000 on PyPI