def main():
    """
    Default entry point
    """
    importer = ExchangeRatesImporter()

    print("####################################")
    latest_rates_json = importer.get_latest_rates()

    # translate into an array of PriceModels
    # TODO mapper = currencyrates.FixerioModelMapper()
    mapper = None
    rates = mapper.map_to_model(latest_rates_json)

    print("####################################")
    print("importing rates into gnucash...")
    # For writing, use True below.
    with BookAggregate(for_writing=False) as svc:
        svc.currencies.import_fx_rates(rates)

    print("####################################")
    print("displaying rates from gnucash...")
    importer.display_gnucash_rates()
Default entry point