Skip to main content

Yarn JS package manager lockfile parser

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyarn-0.1.2.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

pyarn-0.1.2-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file pyarn-0.1.2.tar.gz.

File metadata

  • Download URL: pyarn-0.1.2.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for pyarn-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bd854a7276dc8fe39ef999d5d9c59f6def6e6dc2bc84412e3a84acfa18cbd0b4
MD5 70e2dfb24591629fd25ad81bcfeca05d
BLAKE2b-256 c52ab67780f50f1bc65957d8fa3f20e5e0d80fa9c5548f9921c6b1fed6c6493c

See more details on using hashes here.

File details

Details for the file pyarn-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyarn-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for pyarn-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0fccd361b9defcc8b425c0a04ae9e3b1cf2c81e16d3865d8839ec09016dfd198
MD5 19e7db51465198e62eca2c0534e27fc2
BLAKE2b-256 e6ec7604a4c5155f6796da4918a1d156e2aff45a886f75018e9999fade6bca15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page