# yarnlock
[](https://pypi.org/project/yarnlock)
[](https://liberapay.com/Zaczero/)
[](https://github.com/sponsors/Zaczero)
Quickly parse yarn dependencies information into a Python dictionary. The output is typed using a TypedDict class, making it more convenient to work with.
## Installation
The recommended installation method is through the PyPI package manager. The project is implemented in Rust and several pre-built binary wheels are available for Linux, macOS, and Windows, with support for both x64 and ARM architectures.
```sh
pip install yarnlock
```
## Basic usage
```py
from pathlib import Path
from yarnlock import yarnlock_parse
yarnlock_parse(Path('yarn.lock').read_text())
# ->
# {
# '@babel/cli': {
# 'matches': ['^7.24.8'],
# 'dependencies': {
# 'glob': '^7.2.0',
# 'slash': '^2.0.0',
# 'make-dir': '^2.1.0',
# 'commander': '^6.2.0',
# 'convert-source-map': '^2.0.0',
# 'fs-readdir-recursive': '^1.1.0',
# '@jridgewell/trace-mapping': '^0.3.25',
# },
# 'optionalDependencies': {
# 'chokidar': '^3.4.0',
# '@nicolo-ribaudo/chokidar-2': '2.1.8-no-fsevents.3',
# },
# 'version': '7.24.8',
# 'resolved': 'https://registry.npmjs.org/@babel/cli/-/cli-7.24.8.tgz',
# 'integrity': 'sha512-isdp+G6DpRyKc+3Gqxy2rjzgF7Zj9K0mzLNnxz+E/fgeag8qT3vVulX4gY9dGO1q0y+0lUv6V3a+uhUzMzrwXg==',
# },
# ...
# }
```
Raw data
{
"_id": null,
"home_page": null,
"name": "yarnlock",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "lock, parser, yarn, yarn2dict, yarnlock",
"author": null,
"author_email": "Kamil Monicz <kamil@monicz.dev>",
"download_url": "https://files.pythonhosted.org/packages/2b/7f/12c82b4e01584d87eff495a0dcbcec7d7a332fb16a42299619d6f61d4d8b/yarnlock-1.1.0.tar.gz",
"platform": null,
"description": "# yarnlock\n\n[](https://pypi.org/project/yarnlock)\n[](https://liberapay.com/Zaczero/)\n[](https://github.com/sponsors/Zaczero)\n\nQuickly parse yarn dependencies information into a Python dictionary. The output is typed using a TypedDict class, making it more convenient to work with.\n\n## Installation\n\nThe recommended installation method is through the PyPI package manager. The project is implemented in Rust and several pre-built binary wheels are available for Linux, macOS, and Windows, with support for both x64 and ARM architectures.\n\n```sh\npip install yarnlock\n```\n\n## Basic usage\n\n```py\nfrom pathlib import Path\nfrom yarnlock import yarnlock_parse\n\nyarnlock_parse(Path('yarn.lock').read_text())\n# ->\n# {\n# '@babel/cli': {\n# 'matches': ['^7.24.8'],\n# 'dependencies': {\n# 'glob': '^7.2.0',\n# 'slash': '^2.0.0',\n# 'make-dir': '^2.1.0',\n# 'commander': '^6.2.0',\n# 'convert-source-map': '^2.0.0',\n# 'fs-readdir-recursive': '^1.1.0',\n# '@jridgewell/trace-mapping': '^0.3.25',\n# },\n# 'optionalDependencies': {\n# 'chokidar': '^3.4.0',\n# '@nicolo-ribaudo/chokidar-2': '2.1.8-no-fsevents.3',\n# },\n# 'version': '7.24.8',\n# 'resolved': 'https://registry.npmjs.org/@babel/cli/-/cli-7.24.8.tgz',\n# 'integrity': 'sha512-isdp+G6DpRyKc+3Gqxy2rjzgF7Zj9K0mzLNnxz+E/fgeag8qT3vVulX4gY9dGO1q0y+0lUv6V3a+uhUzMzrwXg==',\n# },\n# ...\n# }\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "yarn.lock file parser",
"version": "1.1.0",
"project_urls": {
"Issues": "https://github.com/Zaczero/yarnlock/issues",
"Repository": "https://github.com/Zaczero/yarnlock"
},
"split_keywords": [
"lock",
" parser",
" yarn",
" yarn2dict",
" yarnlock"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "edd51618c5b0b2e382eebab84949f7156acbfcc7bc0756d97af82a4f91cbf4c2",
"md5": "b0f9e331319a2d9ae750359925b8c54a",
"sha256": "c9dbc7183c642eafb63a2df83958281170278a554e2581b2184499cb8c1b53c1"
},
"downloads": -1,
"filename": "yarnlock-1.1.0-cp39-abi3-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "b0f9e331319a2d9ae750359925b8c54a",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 205277,
"upload_time": "2024-10-26T01:50:41",
"upload_time_iso_8601": "2024-10-26T01:50:41.060680Z",
"url": "https://files.pythonhosted.org/packages/ed/d5/1618c5b0b2e382eebab84949f7156acbfcc7bc0756d97af82a4f91cbf4c2/yarnlock-1.1.0-cp39-abi3-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fd2bbd12bac3229b5cf18f88905b25881ce946844dfd4dc2e2b5e1821a6225c0",
"md5": "025e1c4d7fbfc4cf96a362f27bff94bd",
"sha256": "2c2d8cf802beaf0e05896ee63ddc141e2cfe04f69ffc25ef1f456cf9b12d887c"
},
"downloads": -1,
"filename": "yarnlock-1.1.0-cp39-abi3-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "025e1c4d7fbfc4cf96a362f27bff94bd",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 200362,
"upload_time": "2024-10-26T01:50:42",
"upload_time_iso_8601": "2024-10-26T01:50:42.902479Z",
"url": "https://files.pythonhosted.org/packages/fd/2b/bd12bac3229b5cf18f88905b25881ce946844dfd4dc2e2b5e1821a6225c0/yarnlock-1.1.0-cp39-abi3-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4be661901e8b7bec6455a37a99409db2dd486df66f8b19978258fef886909762",
"md5": "c7c6b7b0b7402400d321df0fe402f49a",
"sha256": "0f67710570c235a118ff6fb7e214953da7c54f03e7c4abbd509af1ede66aa2d9"
},
"downloads": -1,
"filename": "yarnlock-1.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "c7c6b7b0b7402400d321df0fe402f49a",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 208648,
"upload_time": "2024-10-26T01:50:44",
"upload_time_iso_8601": "2024-10-26T01:50:44.290441Z",
"url": "https://files.pythonhosted.org/packages/4b/e6/61901e8b7bec6455a37a99409db2dd486df66f8b19978258fef886909762/yarnlock-1.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "26fae9e29cef9fb6b9eb86f90c4859e37ea3082802976215a08e1eb6cef55732",
"md5": "e804f81d055611e5d59101b1721ccdb7",
"sha256": "9ac21aa476c2802c2ff9a1ba0147afdac5917722241d40cd8ca69220e5564356"
},
"downloads": -1,
"filename": "yarnlock-1.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "e804f81d055611e5d59101b1721ccdb7",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 217793,
"upload_time": "2024-10-26T01:50:46",
"upload_time_iso_8601": "2024-10-26T01:50:46.024308Z",
"url": "https://files.pythonhosted.org/packages/26/fa/e9e29cef9fb6b9eb86f90c4859e37ea3082802976215a08e1eb6cef55732/yarnlock-1.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b4821fbf7c4740d577c1521123493410b260730e925a2b83152cd05fd2755977",
"md5": "409173ddac1134057b47b163a719ae9c",
"sha256": "348310e2611af4113cda368887a1f9a5a3719c96ad8efdd3ff9a34bdb67327c5"
},
"downloads": -1,
"filename": "yarnlock-1.1.0-cp39-abi3-musllinux_1_2_aarch64.whl",
"has_sig": false,
"md5_digest": "409173ddac1134057b47b163a719ae9c",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 414769,
"upload_time": "2024-10-26T01:50:47",
"upload_time_iso_8601": "2024-10-26T01:50:47.047324Z",
"url": "https://files.pythonhosted.org/packages/b4/82/1fbf7c4740d577c1521123493410b260730e925a2b83152cd05fd2755977/yarnlock-1.1.0-cp39-abi3-musllinux_1_2_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fc452610369f31308166d9a75050fab645f261a1a35baa0744ba9777e9e7cdf7",
"md5": "289d71aca81e54bea9daf44114c5cc28",
"sha256": "d8b0ff050475dd9062d86886ed06e7849b260662adbdd4295b1854062f43d13c"
},
"downloads": -1,
"filename": "yarnlock-1.1.0-cp39-abi3-musllinux_1_2_x86_64.whl",
"has_sig": false,
"md5_digest": "289d71aca81e54bea9daf44114c5cc28",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 399095,
"upload_time": "2024-10-26T01:50:48",
"upload_time_iso_8601": "2024-10-26T01:50:48.797626Z",
"url": "https://files.pythonhosted.org/packages/fc/45/2610369f31308166d9a75050fab645f261a1a35baa0744ba9777e9e7cdf7/yarnlock-1.1.0-cp39-abi3-musllinux_1_2_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d94b7c7d05828a48c0dbe19531dd5de363e727eeca4d12acefe7053d4cfa3329",
"md5": "df6aa6ec4fe9b10bd87386ee33aa5763",
"sha256": "5855c5e88cf48bb9ffbc82536963f5e0cb85faeb89c47ad31314830845685656"
},
"downloads": -1,
"filename": "yarnlock-1.1.0-cp39-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "df6aa6ec4fe9b10bd87386ee33aa5763",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 105443,
"upload_time": "2024-10-26T01:50:49",
"upload_time_iso_8601": "2024-10-26T01:50:49.887811Z",
"url": "https://files.pythonhosted.org/packages/d9/4b/7c7d05828a48c0dbe19531dd5de363e727eeca4d12acefe7053d4cfa3329/yarnlock-1.1.0-cp39-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2b7f12c82b4e01584d87eff495a0dcbcec7d7a332fb16a42299619d6f61d4d8b",
"md5": "53eea59d80547dba4df46b36e5a1dbb2",
"sha256": "5063a47b010b3f7468391747bad0fef65b2243603f1e0e764c68b800e8c61c10"
},
"downloads": -1,
"filename": "yarnlock-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "53eea59d80547dba4df46b36e5a1dbb2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 134036,
"upload_time": "2024-10-26T01:50:51",
"upload_time_iso_8601": "2024-10-26T01:50:51.558160Z",
"url": "https://files.pythonhosted.org/packages/2b/7f/12c82b4e01584d87eff495a0dcbcec7d7a332fb16a42299619d6f61d4d8b/yarnlock-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-26 01:50:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Zaczero",
"github_project": "yarnlock",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "yarnlock"
}