Skip to main content

Automate installation of standalone python CLIs

Project description

Automate installation of standalone python CLIs

Version on pypi Tested with Github Actions Test code codecov Python versions tested (link to github project)

Overview

See: major changes in v3.0

pickley allows to install and keep up-to-date standalone pip-installable python CLIs such as tox, twine, etc. A bit like brew or apt, but based solely on pypi

It is similar to pipx, but supports any python (including py2, up to version 2.4.6), offers self-auto-upgrade, and can package folders as well (for deployment, as venv or pex currently).

It can work out of the box, without any configuration:

  • pickley is portable, it will run and install other CLIs in the same folder it’s running from (drop it in ~/.local/bin or /usr/local/bin for example)

  • All pypi packages with console_scripts entry point(s) can be immediately installed

  • Latest non-prerelease pypi version will be installed by default (can be pinned via explicit pin pickley install foo==1.0, or via configuration)

With some configuration, the following becomes possible:

  • You can pin what version to install, what python to use etc, per pypi package

  • You can define bundle-s: names that install several pypi packages at once, for example: you could define a bundle:dev to install tox pipenv pre-commit

  • You can use a custom pypi server index (pip’s default is respected by default)

  • You can use the symlink delivery method, which will use symlinks instead of self-upgrading wrapper

Example

Once you have pickley, you can get other python CLIs and use them as standalone programs, for example:

# One-liner to grab pickley, and drop it in ~/.local/bin
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/codrsquad/pickley/master/get-pickley)"

# Double-check you do have ~/.local/bin in your PATH
$ which -a pickley
~/.local/bin/pickley

$ pickley base
~/.local/bin

$ pickley install tox twine
Installed tox v3.21.4 in 6 seconds 501 ms
Installed twine v3.3.0 in 6 seconds 901 ms

$ which tox
~/.local/bin/tox

$ tox --version
tox version 3.21.4

$ pickley list
| Package    | Version |
-------------|----------
| tox        | 3.21.4  |
| twine      | 3.3.0   |

Configuration

See config

Features

  • Any pypi package that has console_scripts entry point can be installed and kept up-to-date

  • Aims to work with zero configuration (but configuration is possible):

    • entirely portable, installations are performed in the same folder where pickley resides, drop it in ~/.local/bin and all the stuff you install with it will also be there

    • latest non pre-release version from pypi is used

  • Commands:

    • check: exit with code 0 if specified package(s) are up-to-date

    • install: install specified package(s)

    • list: list installed packages via pickley, in folder where it resides (not globally)

    • package: can be used to simplify packaging of python projects for internal use

Installation

Install latest version in ~/.local/bin

Handy one-liner (you can also download the bootsrap script and see its --help):

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/codrsquad/pickley/master/get-pickley)"

Install from source

Run (you will need tox):

git clone https://github.com/codrsquad/pickley.git
cd pickley
tox -e venv
.venv/bin/pickley --help

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

pickley-3.0.2.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

pickley-3.0.2-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file pickley-3.0.2.tar.gz.

File metadata

  • Download URL: pickley-3.0.2.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for pickley-3.0.2.tar.gz
Algorithm Hash digest
SHA256 0756ee0eee1082044dd31e512daf70565d8a5158a36aa0b79a1c2a2447f7e992
MD5 45e0586a7aeb380fa682cfdc86c715ed
BLAKE2b-256 4f50f8f1a4b157f0ac7af562052bf53181093edadb4af05c773ff619fc6af4b9

See more details on using hashes here.

File details

Details for the file pickley-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: pickley-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for pickley-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d06cb174e8d12f4d09185ea9aba12dffaa8230582467c4b3539c72a6222ee656
MD5 e45fcb228df6f3217f4ee2214ede51d4
BLAKE2b-256 296ea505a8f3b9633fee328bf758ffc9daaf8372b76286dada9dcf8e6ad87f67

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