Beispiel #1
0
 def export_quote(self):
     API_CONNECTION = API.API_CONNECTOR(
         "sk_f79736950491411c9a02a29d27108aa0",
         "pk_dc0f023c3e8a445c96dd513c6f795060",
         "https://cloud.iexapis.com/stable/")
     CALL_BACK = API_CONNECTION.check_stock_quote(
         self.name)  # placeholder test
     with open('quote_' + self.name + '.json', 'w') as result:
         json.dump(CALL_BACK, result)
     return CALL_BACK
Beispiel #2
0
# author- samuel - UI design initially concepted by sammie~
#this section of the code functions as the Main() essentially... and functions as the gathering house of all the code

# ----------------------------------------------------------------------
# Import Section
# ----------------------------------------------------------------------

import sys  #typically used for the SYS.exit() commands, but may be used for other purposes
import API
import database

API_CONNECTION = API.API_CONNECTOR("sk_f79736950491411c9a02a29d27108aa0",
                                   "pk_dc0f023c3e8a445c96dd513c6f795060",
                                   "https://cloud.iexapis.com/stable/")

# ----------------------------------------------------------------------
# Var Section
# ----------------------------------------------------------------------

data_list = database.data_store()
# the initilasation of any needed vars for this section of the application

displayVer = 1  # VAR to track need to display a runtime Ver/App Name Message (located in the While Main)
displayVer = int(displayVer)  #used to keep correct VARTYPE
program_Version = 0.5  # VAR used to notate the version number of the UI application feature (Programmer entered value)
choice = 10  # VAR used to decide user input during primary while loop (NOTE) "setup using '10' to avoid any unesssary program exits due to user error
choice = int(choice)  #used to keep correct VARTYPE
stringSearch = "Default"  # VAR used to decide what the user wishes to search up whilst referencing the online API-repository
stockSave = "Default"  # VAR used to decide what stock to download and save from the online API-repository and save locally in the dictonary system
deleteRequest = "Default"  # VAR used to decide what stock to delete from the local dictonary system
sample = "WMT"  # Tester Var "Walmarts" Stock name to be used in any required tests during Development or Based on any need during runtime