-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from open-contracting/docs
Start Docs with a basic functions page that can be expanded later.
- Loading branch information
Showing
5 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
If you are viewing this on GitHub, open the `full documentation <https://kingfisher-colab.readthedocs.io/>`__ for additional details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
master_doc = 'index' | ||
|
||
project = 'OCDS Kingfisher Colab Tool' | ||
copyright = '2019, Open Contracting Data Standard' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
Functions | ||
========= | ||
|
||
All functions are in the package; to import them use something like: | ||
|
||
.. code-block:: python | ||
from kingfishercolab import create_connection, authenticate_gspread, getResults, saveToCSV, saveToSheets, saveStraightToSheets, downloadReleases, output_notebook, set_spreadsheet_name, authenticate_pydrive, downloadReleases | ||
create_connection | ||
----------------- | ||
|
||
Creates a connection to the database. | ||
|
||
reset_connection | ||
---------------- | ||
|
||
Closes and resets connection to database. | ||
|
||
This does not re-open the connection again. | ||
|
||
authenticate_gspread | ||
-------------------- | ||
|
||
Authenticates the current user and gives the notebook permission to connect to Google Spreadsheets. | ||
|
||
authenticate_pydrive | ||
-------------------- | ||
|
||
Authenticates the current user and gives the notebook permission to connect to Google Drive. | ||
|
||
getResults | ||
---------- | ||
|
||
Takes in a database cursor and returns a Pandas DataFrame. | ||
|
||
saveToCSV | ||
--------- | ||
|
||
Takes in a Pandas DataFrame and save the data to a file in the notebook. | ||
|
||
set_spreadsheet_name | ||
-------------------- | ||
|
||
Sets the name of the spreadsheet to save. Used by saveStraightToSheets. | ||
|
||
saveStraightToSheets | ||
-------------------- | ||
|
||
Saves a DataFrame straight to a Google Spreadsheet. | ||
|
||
saveToSheets | ||
------------ | ||
|
||
The same as saveStraightToSheets, except the user is prompted if they are sure first. | ||
|
||
downloadReleases | ||
---------------- | ||
|
||
Downloads some releases into a file in the notebook. | ||
|
||
output_gsheet | ||
------------- | ||
|
||
This has not been coded yet. | ||
|
||
output_flattened_gsheet | ||
----------------------- | ||
|
||
This has not been coded yet. | ||
|
||
output_notebook | ||
--------------- | ||
|
||
Runs a SQL query and returns results to the notebook. | ||
|
||
download_json | ||
------------- | ||
|
||
This has not been coded yet. | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
OCDS Kingfisher Colab | ||
===================== | ||
|
||
OCDS Kingfisher Colab is a library of handy functions for use in Colab notebooks. | ||
|
||
.. toctree:: | ||
|
||
functions.rst |