Collaborative development

0. In this scenario we assume the registry has been initialized and that an entry has been added (CLI).

$ transport registry add address-db ./http-auth.json

The python code would look like the following :

import transport
#
# we are using "address-db" to refrence the content of http-auth.json file


dbreader = transport.get.reader(label='address-db')
_df = dbreader.read()
print (_df.head())

1. Alternatively it is possible to directly use the authentication file dubbed "auth-file".

import transport
#
# http-auth.json contians connectivity parameters.


dbreader = transport.get.reader(auth_file='http-auth.json')
_df = dbreader.read()
print (_df.head())

Non-collaborative development

In this scenario, we are using connectivity parameters in the code. This scenario is suited for non-collaborative environments.

import transport
#
# In this scenario we are loading an SQLite3+ database
url= "https://raw.githubusercontent.com/codeforamerica/ohana-api/master/data/sample-csv/addresses.csv"
_args = {"provider":"http","url":url}

dbreader = transport.get.reader(**_args)
_df = dbreader.read()
print (_df.head())

Learn more
It is possible to initialize the registry; run ETL from your code as well as from the command line (CLI). We compiled this in notebooks available in our code repository