Skip to main content

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.

Release files for soh 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soh 0.1.1
File Size Uploaded
soh-0.1.1.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for soh 0.1.1
File Interpreter ABI Platform
soh-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 38.5 kB

Release files / soh-0.1.1.tar.gz

Download URL soh-0.1.1.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fbb97b4fd8e04c88bd0ca94bf64a6252c800cff40f566e5d693b97a4a30adce8
BLAKE2b-256 checksum
How to use checksums
f45bf6cb545ad3311d91db5645cfeb90ece48224954f7085056e97ae279473b7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / soh-0.1.1-py3-none-any.whl

Download URL soh-0.1.1-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9179ef8940f2dbb2ef300bbf1bc7b5d008ca204e3068e76d1a6c666318b0e60d
BLAKE2b-256 checksum
How to use checksums
ee3e3ea206439b401b9191789895a4e8c3d93fe371afe5ba50513bf745b95ad7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page