anon-ai-toolbelt

A command-line tool for using the Anon AI web service.


Keywords
anonymisation, cli, data, python
License
MIT
Install
pip install anon-ai-toolbelt==0.3.0

Documentation

Hazy Toolbelt

The Hazy Toolbelt is the command line interface (CLI) to the Hazy web service. It's developed in Python and the code is published under the MIT License at github.com/hazy/toolbelt.

Status - WIP

This toolbelt and the JSON API that it targets are both under active development and are not ready for general use yet.

Install

Use

The toolbelt is designed to be used as a pre-built standalone binary. One way to get up and running is to download the latest binary for your architecture from the releases page and put the binary file somewhere on your PATH.

Alternatively on OSX you can install using Homebrew:

brew tap hazy/toolbelt
brew install hazy

Or if you're using Python3, you can install directly from PyPI:

pip install hazy

Develop

You can install the toolbelt for local development by installing the dependencies into a Python3 environment and developing the egg:

pip install -r requirements.txt
python setup.py develop

This will install a hazy binary in your local Python environment's bin folder. You can check that this is on your path with e.g.:

which hazy

Build

Note that as of time of writing (7th August 2018) PyInstaller is verified as working with Python 3.6 and has some issues under 3.7.

You can build a standalone hazy binary (for your architecture) using PyInstaller. This requires additional dependencies.

First ensure you have Pandoc, for example using Homebrew:

brew install pandoc

Then install the additional python dependencies:

pip install -r maintainer-requirements.txt

You can then build using:

./_build.sh

This will write a standalone binary to ./dist/hazy. You can optionally copy this to /usr/local/bin/hazy using:

./_link.sh

Release

You can publish a new version of the toolbelt to PyPI by bumping the version number in ./VERSION and running:

./_release.sh

TODO:

  • update release script to publish binaries
  • build binaries for multiple platforms

Usage

Run the hazy command without arguments or with the --help flag for usage information:

hazy --help

You can drill down into usage information for the resources / command groups and for individual commands, e.g.:

hazy auth --help
hazy auth login --help

Further documentation is available on the Hazy website.

Test

Running the tests requires nose and coverage, included in the maintainer-requirements.txt.

Then, run e.g.:

nosetests --with-coverage --cover-package hazy