Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

Project Description

The Anon AI Toolbelt is a command line interface (CLI) tool for managing and anonymising data with the Anon AI web service.

It’s developed in Python and the code is published under the MIT License at github.com/anon-ai/toolbelt.

Installation

Install using pip into a Python3 environment:

pip install anon-ai-toolbelt

Note that the toolbelt only works with Python3 and installs dependencies including the Python Cryptography Toolkit.

Usage

The primary workflow is for a data controller to push data into the system and then for data processors to pull the data down in anonymised form.

Login

Login with your API credentials (writes to ~/.config/anon.ai/config.json):

anon login
> key: ...
> secret: ...

Push

Push a data snapshot up to ingest and store it.

anon push foo.dump mydb

When ingesting structured data you should specify the data format:

anon push foo.dump mydb --format postgres

In this example, mydb is an arbitrary resource name that you use to identify this ingested data source. Subsequent pushes to the same name are usually used to store a new snapshot of the same file or database.

The stored data is encrypted using AES-256 with a per-account encryption key that lives in (and never leaves) a secure vault. You can also optionally provide your own encryption key:

anon push foo.dump mydb --encryption-key LONG_RANDOM_STRING

Note that:

  1. your encryption key is never persisted in our system – so you have to manage it and give it to any users that you want to share anonymised data with
  2. there’s no strict requirement on length or format for your encryption key value (we SHA-256 hash it along with your per-account encryption key) but we recommend at least 16 bytes entropy

Pull

Pull down an anonymised copy of an ingested data snapshot:

anon pull mydb foo.dump

Optionally provide an encryption key (to decrypt the stored data with) and / or configure how you’d like it anonymised:

anon pull mydb foo.dump --config config.json --encryption-key ...

Pipe

Pipe data through to anonymise it:

anon pipe http://humanstxt.org/humans.txt /tmp/humans.anon.txt

This parses, analyses and anonymises the data on the fly, i.e.: without persisting it. The data source must currently be a URL.

Versions

You can pull specific snapshot versions by targeting them by name:

anon pull mydb --snapshot someid

You can also push snapshots up with a specific name:

anon push foo.sql mydb --snapshot someid

Tab completion

Enable bash completion by adding the following to your .bashrc:

eval "$(_ANON_COMPLETE=source anon)"

If you use zsh, you can emulate bash completion by first adding bashcompinit to your .zshrc:

autoload bashcompinit
bashcompinit
eval "$(_ANON_COMPLETE=source anon)"

For more information see Anon AI.

Release History

Release History

This version
History Node

0.3.0

History Node

0.2.10

History Node

0.2.9

History Node

0.2.8

History Node

0.2.7

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
anon-ai-toolbelt-0.3.0.tar.gz (8.4 kB) Copy SHA256 Checksum SHA256 Source Dec 29, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting