Skip to main content

Coverage Status

PYarn

If, for some weird reason, you need to parse a Yarn's yarn.lock file using Python, you are in the right place!

PYarn is currently in an early developmente stage. It will create a dict from a yarn.lock file, given the yarn.lock file is correct as per its implementation. At this moment, there is no guarantees that PYarn will behave well (e.g., raise an error) in case a malformed Yarn lockfile is passed to PYarn.

PYarn only supports Yarn v1 lockfiles. Parsing Yarn v2 lockfiles should be trivial since they are yaml files.

Development

make devel
make check

Usage

The following prints all the content in the yarn.lock file:

from pyarn import lockfile

my_lockfile = lockfile.Lockfile.from_file(FILE_NAME)
print(my_lockfile.data)
# or
my_lockfile.to_json()

my_lockfile.data is a dict where the top level keys are the top level entries (i.e., the package names) for the yarn.lock file entries.

Releasing

Before releasing a new version to PyPI, don't forget to bump the version number in setup.cfg.

Make sure to git tag the release commit with the corresponding version and create a Github release explaining what is new.

Afterwards, releasing to PyPI is quite simple:

make build
twine check dist/*
twine upload dist/*

Release files for pyarn 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyarn 0.3.0
File Size Uploaded
pyarn-0.3.0.tar.gz 23.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyarn 0.3.0
File Interpreter ABI Platform
pyarn-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.0 kB

Release files / pyarn-0.3.0.tar.gz

Download URL pyarn-0.3.0.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8f799d94a9b2fd4bd54185149d8745187c7ededcde98576ff70bf0823fd8a710
BLAKE2b-256 checksum
How to use checksums
eb2418350902327b2f2847dae71f6ed71814c361e36ce0173a48ff12a876069d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Release files / pyarn-0.3.0-py3-none-any.whl

Download URL pyarn-0.3.0-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8eaed3ae80c1891a8ea7f6b7538c049a79dd7e7d3b4279f275699b3477b38c2
BLAKE2b-256 checksum
How to use checksums
9d126f36ab6f67696529144327d5981268b4c490fd7dd282cc9095a46db18699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page