:py:mod:`config_from_pg.generate` ================================= .. py:module:: config_from_pg.generate .. autoapi-nested-parse:: Generates config based on pgconfig.settings and pickles for reuse in webapp. This code is expected to be used on Postgres 10 and newer. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: config_from_pg.generate.run config_from_pg.generate.get_pg_version_num config_from_pg.generate.get_config_data config_from_pg.generate.save_config_data .. py:function:: run() Saves pickled config data from defined database connection. .. py:function:: get_pg_version_num() -> int Returns the Postgres version number as an integer. Expected to be used on Postgres 10 and newer only. :returns: **pg_version_num** :rtype: int .. py:function:: get_config_data() -> list Query Postgres for data about default settings. :returns: **results** :rtype: list .. py:function:: save_config_data(data: list, pg_version_num: int) Pickles config data for reuse later. :param data: List of dictionaries to pickle. :type data: list :param pg_version_num: Integer of Postgres version. :type pg_version_num: int