Command line (CLI)
# creates folders and files needed
$ transport registry reset < your email >
Create a file http-auth.json and it should contain the following
{
"provider":"http",
"url":"https://raw.githubusercontent.com/codeforamerica/ohana-api/master/data/sample-csv/addresses.csv"
}
Add the created file
http-auth.json to the registry under the label
address-db
$ transport registry --add address-db http-auth.json
In code
import transport
import io
import json
#
# transport.registry.exists()
_email = 'steve@the-phi.com'
transport.registry.init(_email)
#
# Adding the entry to the registry now that is initialized
_authStr = {"provider":"http",
"url":"https://raw.githubusercontent.com/codeforamerica/ohana-api/master/data/sample-csv/addresses.csv"
}
file = io.StringIO(json.dumps(_authStr))
transport.registry.set('address-db',file)