:py:mod:`gbif_registrar.configure` ================================== .. py:module:: gbif_registrar.configure .. autoapi-nested-parse:: Configure the gbif_registrar package for use. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: gbif_registrar.configure.load_configuration gbif_registrar.configure.unload_configuration gbif_registrar.configure.initialize_configuration_file .. py:function:: load_configuration(configuration_file) Loads the configuration file as global environment variables for use by the gbif_registrar functions. Remove these environment variables with the unload_configuration function. :param configuration_file: Path of the configuration file. :type configuration_file: str :rtype: None .. rubric:: Notes Create a template configuration file with the initialize_configuration_file function. .. rubric:: Examples >>> load_configuration("configuration.json") .. py:function:: unload_configuration() Removes global environment variables set by the load_configuration function. :rtype: None .. rubric:: Examples >>> unload_configuration() .. py:function:: initialize_configuration_file(file_path) Returns a template configuration file to path. The template configuration contains all the parameters a user needs to set up the gbif_registrar package for use. :param file_path: Path to which the configuration file will be written. :type file_path: str :returns: Writes the template configuration file to disk as a .json file. :rtype: None .. rubric:: Notes The configuration file is a .json file with the following keys: USER_NAME : str The username for the GBIF account. PASSWORD : str The password for the GBIF account. ORGANIZATION : str The organization key for the GBIF account. INSTALLATION : str The installation key for the GBIF account. GBIF_API : str The GBIF API endpoint. REGISTRY_BASE_URL : str The GBIF registry base URL. GBIF_DATASET_BASE_URL : str The GBIF dataset base URL. PASTA_ENVIRONMENT : str The PASTA environment base URL. .. rubric:: Examples >>> initialize_configuration_file("configuration.json")