py.lockfile2


Namepy.lockfile2 JSON
Version 0.3.0 PyPI version JSON
download
home_page
SummaryThis is a simple tool for download python packages managed by lock file.
upload_time2024-01-05 08:07:18
maintainer
docs_urlNone
authorMartin Korbel
requires_python>=3.6,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/pypi/v/py.lockfile2?color=green&style=plastic)](https://pypi.org/project/py.lockfile2/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py.lockfile2?style=plastic)
![License](https://img.shields.io/github/license/Blacksmith/py.lockfile?style=plastic)
# py.lockfile

Install
```shell
pip install py.lockfile2
```

**py.lockfile** is a tool for downloading of python packages for various OS, CPU
and python versions.

## Motivation
Python projects managed by [pipenv](https://pipenv.pypa.io/), [poetry](https://python-poetry.org/) or [pdm](https://pdm-project.org/) use 
lock files for freeze packages in specific version.
It is very useful for stability of whole project. However, for installing these
freeze packages, we have to use mentioned package managers, which bring many
unwanted dependencies. It is uncomfortable especially for building of docker
containers.

This tool takes `Pipfile.lock`/`poetry.lock`/`pdm.lock` file and downloads all required packages
(for specific OS, CPU and python version) to target directory. 
After that we can install them by simple `pip`.


## The simple example of usage
```shell
> py.lockfile -s tests/poetry.lock -t wheels/
📦 cffi 1.15.1  cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

> pip install wheels/*
cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
```

## Advance options

The tool accepts many arguments, the most useable are  `--python-version` and `--platform`.
They can help us to download packages for different python version or OS platform.
Get the correct value of `--platform` attribute for your system, can be
complicated. This command can help `py_lockfile --help | grep 'Your current platform'`

```shell
> py.lockfile --help
usage: py_lockfile [-h] [-s SOURCEFILE] [-t TARGET] [-g GROUP] [-p PYTHON_VERSION] [--platform PLATFORM] [--python-implementation {cp,ip,pp,jy}] [--ignore-missing] [--ignore-hash] [--no-binary] [--dryrun] [--no-color]

Python package downloader.
---------------------------------

This is a simple tool for download python packages managed by lock file.
Repository credentials can be set by environment variables
(PYLF_<NAME>_USERNAME, PYLF_<NAME>_PASSWORD and PYLF_<NAME>_URL).

Supported:
    * Pipfile.lock - Pipenv.
    * poetry.lock - Poetry, the repository credentials are automatically loaded
                    from ~/.config/pypoetry/auth.toml.
    * pdm.lock - PDM, the repository credentials are automatically loaded from
                 pyproject.toml

optional arguments:
  -h, --help            show this help message and exit
  -s SOURCEFILE, --sourcefile SOURCEFILE
                        source file (e.g. Pipfile.lock, poetry.lock or pdm.lock)
  -t TARGET, --target TARGET
                        Download folder (default: ./wheels)
  -g GROUP, --group GROUP
                        Append optional group of packages (e.g. dev)
  -p PYTHON_VERSION, --python-version PYTHON_VERSION
                        Download packages for python version (default: 3.9.5).
  --platform PLATFORM   Download packages for platform (default: manylinux_2_28_x86_64).
  --python-implementation {cp,ip,pp,jy}
                        Download packages for python implementation (default: cp).
  --ignore-missing      Skip missing packages.
  --ignore-hash         Ignore package hash checking.
  --no-binary           Download only source packages.
  --dryrun              Dry run. No download will be performed.
  --no-color            Disable color output.

SOURCEFILE:
    Automatically try to find supported files in current folder.

PLATFORM:
    Your current platform is 'manylinux_2_28_x86_64'
    See more https://peps.python.org/pep-0491/#file-name-convention
    e.g.:
        * macosx_10_9_x86_64
        * win_amd64
        * manylinux_2_17_x86_64    # glib linux systems (RHEL based system) https://peps.python.org/pep-0600/
        * musllinux_1_1_x86_64     # musl linux systems (AlpineLinux) https://peps.python.org/pep-0656/

PYTHON_IMPLEMENTATION:
   * 'cp' - CPython
   * 'pp' - Pypy
   * 'ip' - IronPython
   * 'jy' - Jython

```

As default values of `--python-version`, `--platform` and `--python-implementation` are set your current python configuration.
However, you can download packages for different configuration as well. 

```shell
> py.lockfile -s tests/poetry.lock -t wheels/ --python-version 2.7 --platform win_amd64
📦 cffi 1.15.1  cffi-1.15.1-cp27-cp27m-win_amd64.whl
```

## Download packages from a private repository
Credentials are automatically loaded from `pypoetry/auth.toml`, `pyproject.toml` 
or we can overwrite them by environment variables.
```shell
PYLF_<REPO_NAME>_USERNAME=user PYLF_<REPO_NAME>_PASSWORD=password  py.lockfile ...
```

Optionally, we can set `PYLF_<REPO_NAME>_URL` as well, for appending custom pypi
entry point.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "py.lockfile2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Martin Korbel",
    "author_email": "git@github.com",
    "download_url": "https://files.pythonhosted.org/packages/2f/e7/d1208d25e6b77bb8cef6e54dfb2d6b2763ec2b5a28b771e26eed11308e0a/py_lockfile2-0.3.0.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/pypi/v/py.lockfile2?color=green&style=plastic)](https://pypi.org/project/py.lockfile2/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py.lockfile2?style=plastic)\n![License](https://img.shields.io/github/license/Blacksmith/py.lockfile?style=plastic)\n# py.lockfile\n\nInstall\n```shell\npip install py.lockfile2\n```\n\n**py.lockfile** is a tool for downloading of python packages for various OS, CPU\nand python versions.\n\n## Motivation\nPython projects managed by [pipenv](https://pipenv.pypa.io/), [poetry](https://python-poetry.org/) or [pdm](https://pdm-project.org/) use \nlock files for freeze packages in specific version.\nIt is very useful for stability of whole project. However, for installing these\nfreeze packages, we have to use mentioned package managers, which bring many\nunwanted dependencies. It is uncomfortable especially for building of docker\ncontainers.\n\nThis tool takes `Pipfile.lock`/`poetry.lock`/`pdm.lock` file and downloads all required packages\n(for specific OS, CPU and python version) to target directory. \nAfter that we can install them by simple `pip`.\n\n\n## The simple example of usage\n```shell\n> py.lockfile -s tests/poetry.lock -t wheels/\n\ud83d\udce6 cffi 1.15.1  cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\n\n> pip install wheels/*\ncffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\n```\n\n## Advance options\n\nThe tool accepts many arguments, the most useable are  `--python-version` and `--platform`.\nThey can help us to download packages for different python version or OS platform.\nGet the correct value of `--platform` attribute for your system, can be\ncomplicated. This command can help `py_lockfile --help | grep 'Your current platform'`\n\n```shell\n> py.lockfile --help\nusage: py_lockfile [-h] [-s SOURCEFILE] [-t TARGET] [-g GROUP] [-p PYTHON_VERSION] [--platform PLATFORM] [--python-implementation {cp,ip,pp,jy}] [--ignore-missing] [--ignore-hash] [--no-binary] [--dryrun] [--no-color]\n\nPython package downloader.\n---------------------------------\n\nThis is a simple tool for download python packages managed by lock file.\nRepository credentials can be set by environment variables\n(PYLF_<NAME>_USERNAME, PYLF_<NAME>_PASSWORD and PYLF_<NAME>_URL).\n\nSupported:\n    * Pipfile.lock - Pipenv.\n    * poetry.lock - Poetry, the repository credentials are automatically loaded\n                    from ~/.config/pypoetry/auth.toml.\n    * pdm.lock - PDM, the repository credentials are automatically loaded from\n                 pyproject.toml\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -s SOURCEFILE, --sourcefile SOURCEFILE\n                        source file (e.g. Pipfile.lock, poetry.lock or pdm.lock)\n  -t TARGET, --target TARGET\n                        Download folder (default: ./wheels)\n  -g GROUP, --group GROUP\n                        Append optional group of packages (e.g. dev)\n  -p PYTHON_VERSION, --python-version PYTHON_VERSION\n                        Download packages for python version (default: 3.9.5).\n  --platform PLATFORM   Download packages for platform (default: manylinux_2_28_x86_64).\n  --python-implementation {cp,ip,pp,jy}\n                        Download packages for python implementation (default: cp).\n  --ignore-missing      Skip missing packages.\n  --ignore-hash         Ignore package hash checking.\n  --no-binary           Download only source packages.\n  --dryrun              Dry run. No download will be performed.\n  --no-color            Disable color output.\n\nSOURCEFILE:\n    Automatically try to find supported files in current folder.\n\nPLATFORM:\n    Your current platform is 'manylinux_2_28_x86_64'\n    See more https://peps.python.org/pep-0491/#file-name-convention\n    e.g.:\n        * macosx_10_9_x86_64\n        * win_amd64\n        * manylinux_2_17_x86_64    # glib linux systems (RHEL based system) https://peps.python.org/pep-0600/\n        * musllinux_1_1_x86_64     # musl linux systems (AlpineLinux) https://peps.python.org/pep-0656/\n\nPYTHON_IMPLEMENTATION:\n   * 'cp' - CPython\n   * 'pp' - Pypy\n   * 'ip' - IronPython\n   * 'jy' - Jython\n\n```\n\nAs default values of `--python-version`, `--platform` and `--python-implementation` are set your current python configuration.\nHowever, you can download packages for different configuration as well. \n\n```shell\n> py.lockfile -s tests/poetry.lock -t wheels/ --python-version 2.7 --platform win_amd64\n\ud83d\udce6 cffi 1.15.1  cffi-1.15.1-cp27-cp27m-win_amd64.whl\n```\n\n## Download packages from a private repository\nCredentials are automatically loaded from `pypoetry/auth.toml`, `pyproject.toml` \nor we can overwrite them by environment variables.\n```shell\nPYLF_<REPO_NAME>_USERNAME=user PYLF_<REPO_NAME>_PASSWORD=password  py.lockfile ...\n```\n\nOptionally, we can set `PYLF_<REPO_NAME>_URL` as well, for appending custom pypi\nentry point.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is a simple tool for download python packages managed by lock file.",
    "version": "0.3.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f26437837b5a632d7351653141e1aab6b1598c4c1166c0f61a2f5f922966d46f",
                "md5": "30881b34044283a7ae08a57797133b4c",
                "sha256": "0222d5b60715b12e599b5ff4743bdfaeef220f730fcaa574abec03f506365d26"
            },
            "downloads": -1,
            "filename": "py_lockfile2-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30881b34044283a7ae08a57797133b4c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<4.0",
            "size": 11197,
            "upload_time": "2024-01-05T08:07:16",
            "upload_time_iso_8601": "2024-01-05T08:07:16.206146Z",
            "url": "https://files.pythonhosted.org/packages/f2/64/37837b5a632d7351653141e1aab6b1598c4c1166c0f61a2f5f922966d46f/py_lockfile2-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fe7d1208d25e6b77bb8cef6e54dfb2d6b2763ec2b5a28b771e26eed11308e0a",
                "md5": "a1e91db412cc64c73ed1d90eb58313d1",
                "sha256": "50d52523d684d1577ab0d346e0d48c8ba0cbc437a2aa697f2d418141c6610a05"
            },
            "downloads": -1,
            "filename": "py_lockfile2-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a1e91db412cc64c73ed1d90eb58313d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6,<4.0",
            "size": 10999,
            "upload_time": "2024-01-05T08:07:18",
            "upload_time_iso_8601": "2024-01-05T08:07:18.198799Z",
            "url": "https://files.pythonhosted.org/packages/2f/e7/d1208d25e6b77bb8cef6e54dfb2d6b2763ec2b5a28b771e26eed11308e0a/py_lockfile2-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-05 08:07:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "py.lockfile2"
}
        
Elapsed time: 0.15968s