Settings & Helpers Functions - NYCPlanning/db-data-library GitHub Wiki

Setting environmental variables for the tool and various helper functions mostly are in two Python script files __init__.py and utils.py.

__init__.py

this is the script set the stage before any data library action takes place. A few purposes in order:

  1. load functionalities such as rich and load_dotenv for global use.
  2. set the environmental variables for gdal. For more reading on the use of gdal configuration options read here and list of available gdal options.
  3. set up folder structure for local cache test output for certain dataset.

utils.py

two helpers functions

  1. parse_engine speciically designed to help handle url for any postgres connection
  2. format_url handle url from s3 and handle if the source is in a .zip format