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/*
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyarn-0.3.0.tar.gz | 23.0 kB | Without provenance | Details for pyarn-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyarn-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyarn-0.3.0-py3-none-any.whl |
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
|
Security for pyarn 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.