You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.5 KiB
HTML

<style>
</style>
<script>
$(document).ready(function(){
// qcms.source_code()
_layout = {on:{load:{'visit-us':['www/html/visit-us.html']}}}
bootup.init('',_layout)
})
</script>
<div style="display:grid; grid-template-columns:49% auto 49%; gap:8px; width:100%">
<div>
<div class="bold">Collaborative development</div>
<p>
<b>0.</b> In this scenario we assume the registry has been initialized and that an entry has been added (CLI).
<div class="source-code">
<b>$ </b> transport registry add address-db ./http-auth.json
</div>
</p>
The python code would look like the following :
<br></br><div class="source-code" >
<b>import</b> transport
<br><i>#
<br># we are using "address-db" to refrence the content of http-auth.json file
</i>
<br>
<br>dbreader = transport.get.reader(label='address-db')
<br>_df = dbreader.read()
<br><b>print</b> (_df.head())
</div>
<p style="border-top:4px dotted #CAD5E0; padding-top:8px;">
<b>1.</b> Alternatively it is possible to directly use the authentication file dubbed "<b>auth-file</b>".
<div class="source-code" >
<b>import</b> transport
<i>
<br>#
<br># <b>http-auth.json</b> contians connectivity parameters.
</i>
<br><br>dbreader = transport.get.reader(auth_file='http-auth.json')
<br>_df = dbreader.read()
<br><b>print</b> (_df.head())
</div>
</p>
</div>
<div style="border-left:4px dotted #CAD5E0;"></div>
<div>
<div class="bold">Non-collaborative development</div>
<p>
In this scenario, we are using connectivity parameters in the code. This scenario is suited for <b>non-collaborative</b> environments.
</p>
<div class="source-code">
<b>import</b> transport
<br>#
<br># In this scenario we are loading an SQLite3+ database
<br>url= "https://raw.githubusercontent.com/codeforamerica/ohana-api/master/data/sample-csv/addresses.csv"
<br>_args = {"provider":"http","url":url}
<br><br>dbreader = transport.get.reader(**_args)
<br>_df = dbreader.read()
<br><b>print</b> (_df.head())
</div>
<p style="border-top:4px dotted #CAD5E0">
<div class="bold">Learn more</div>
It is possible to <b>initialize the registry</b>; <b>run ETL</b> from your code as well as from the command line (CLI). We compiled this in notebooks available in our code repository
</p>
<div id="visit-us" class="visit-us"></div>
</div>
</div>