Skip to main content

Sleight of hand (soh) CLI tool.

Project description

travis codecov pypi pyversions

Sleight of hand, or soh, is a command line tool that handles a lot of common tasks for developers. For the most part, it offers a convenient command line interface to a lot of standard library operations, such as base64 encoding, creating datetime strings, fetching system information, uuid generation, etc.

Installation

To install soh use pip.

pip install soh

Usage

The entry point for all commands is

$ soh
Usage: soh [OPTIONS] COMMAND [ARGS]...

  Sleight of hand CLI commands.

  (+) indicates command group. Use the -c flag on most commands to copy
  output to clipboard

Options:
  -h, --help  Show this message and exit.

Commands:
  b64      + Base64 operations
  create   + Create files
  dt       + Datetimes
  epoch    + Epoch times
  json     JSON printing
  jwt      Display JWT contents
  secret   + Secrets generators
  serve    Simple http server at current directory
  sys      + System information
  uuid     Generate UUIDs
  version  soh CLI version

To get help on any command use the -h or --help flag.

$ soh uuid -h
Usage: soh uuid [OPTIONS]

  Generate UUIDs.

Options:
  -v, --version INTEGER  uuid version  [default: 4]
  -ns, --namespace TEXT  namespace (v3, v5) {dns, url, oid, x500}
  -n, --name TEXT        name (v3, v5)
  -u, --upper            use upper case
  -c, --clip             copy to clipboard
  -h, --help             Show this message and exit.

To copy the execution output of most commands to clipboard, use the -c or --clip command.

$ soh uuid -c
c64af300-8895-4dff-b005-15dcd4c72f24 (copied to clipboard 📋)

Developer Setup

To set up a local development environment follow these (or portions of these) steps.

# clone
git clone git@github.com:crflynn/soh.git
cd soh

# setup pre-commit
brew install pre-commit
pre-commit install

# setup pyenv and python 3
brew install pyenv
pyenv install 3.7.3
pyenv local 3.7.3

# setup poetry and install deps
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
poetry install
poetry install --develop soh

pre-commit will enforce black code formatting to pass before committing. The configuration for black is in the pyproject.toml file.

To run tests,

pytest

The testing configuration is found in pytest.ini.

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

soh-0.1.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

soh-0.1.1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file soh-0.1.1.tar.gz.

File metadata

  • Download URL: soh-0.1.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for soh-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fbb97b4fd8e04c88bd0ca94bf64a6252c800cff40f566e5d693b97a4a30adce8
MD5 566175dd5da3895e08b38c1e2f89e3d3
BLAKE2b-256 f45bf6cb545ad3311d91db5645cfeb90ece48224954f7085056e97ae279473b7

See more details on using hashes here.

File details

Details for the file soh-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: soh-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for soh-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9179ef8940f2dbb2ef300bbf1bc7b5d008ca204e3068e76d1a6c666318b0e60d
MD5 ab338a3abcc4752cdb1be5c9c9e2b064
BLAKE2b-256 ee3e3ea206439b401b9191789895a4e8c3d93fe371afe5ba50513bf745b95ad7

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