Automate installation of standalone python CLIs
Project description
Automate installation of standalone python CLIs
Overview
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 $ curl -fsSL https://raw.githubusercontent.com/codrsquad/pickley/master/src/pickley/bstrap.py | /usr/bin/python3 - # 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-line using bash:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/codrsquad/pickley/master/get-pickley)"
Handy one-liner using python (see --help, the script accepts a few options):
$ curl -fsSL https://raw.githubusercontent.com/codrsquad/pickley/master/src/pickley/bstrap.py | /usr/bin/python3 - --help
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pickley-3.1.6.tar.gz
.
File metadata
- Download URL: pickley-3.1.6.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ab596a519cecb10e4ef86b3f5359c1d53306d165be447bcf32daf750f03988b |
|
MD5 | ac3d661a09a37f8e7b555b0124201159 |
|
BLAKE2b-256 | ae1fb90ca503e40d011d090032a7e1254f0ee12561c519c779ff888283bb5a61 |
File details
Details for the file pickley-3.1.6-py3-none-any.whl
.
File metadata
- Download URL: pickley-3.1.6-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fbfdcd07a5cceacc643a2d1d9b8d993fb39446c22fefd06f07132d4d061d029 |
|
MD5 | 18292a8ee9a810dc32aff0c936b68e7b |
|
BLAKE2b-256 | 062bc678a853fd797f9c50dda18e9429ab7685b75c5bd349287c4f39f7610910 |