retriever package

Submodules

retriever.compile module

retriever.compile.compile()

retriever.lscolumns module

retriever.lscolumns.get_columns(values, cols)
retriever.lscolumns.printls(values, max_width=None, spacing=2)

retriever.term_size module

retriever.term_size.get_terminal_size()

retriever.try_install_all module

Attempt to install all datasets into all database management systems

This module, when run, attempts to install datasets from all Retriever scripts in the /scripts folder (except for those listed in IGNORE), for each engine in ENGINE_LIST() from __init__.py. In other words, it runs trys to install using all possible combinations of database platform and script and checks to see if there are any errors. It does not check the values in the database.

retriever.version module

Generates a configuration file containing the version number.

retriever.version.get_module_version()

This function gets the version number of the scripts and returns them in array form.

Module contents

Data Retriever

This package contains a framework for creating and running scripts designed to download published ecological data, and store the data in a database.

retriever.ENGINE_LIST()
retriever.MODULE_LIST(force_compile=False)

Load scripts from scripts directory and return list of modules.

retriever.SCRIPT_LIST(force_compile=False)
retriever.open_csvw(csv_file, encode=True)

Open a csv writer forcing the use of Linux line endings on Windows

Also sets dialect to ‘excel’ and escape characters to ‘’

retriever.open_fr(file_name, encoding='ISO-8859-1', encode=True)

Open file for reading respecting Python version and OS differences

Sets newline to Linux line endings on Windows + Python 3 When encode=False does not set encoding on *nix + Python 3 to keep as bytes

retriever.open_fw(file_name, encoding='ISO-8859-1', encode=True)

Open file for writing respecting Python version and OS differences

Sets newline to Linux line endings on Python 3 When encode=False does not set encoding on *nix + Python 3 to keep as bytes

retriever.set_proxy()

Check for proxies and makes them available to urllib

retriever.to_str(object, object_encoding=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)