ServerPortfolio
2.0
Python parsers and server
|
Standalone program, implement all possible functions with or without the Server running. More...
Functions | |
def | send_to_server |
Get the last instantaneous data of the list of stocks. More... | |
def | CallYahooCSV |
Make calls to YahooAPI module. More... | |
Variables | |
verbose = None | |
tuple | arg_parser = argparse.ArgumentParser(description="Main executable for parsing data from web page") |
string | help = 'method GET / FORCE / UPDATE_CSV / TEST_SERVER' |
tuple | option = arg_parser.parse_args() |
tuple | logger = logging.getLogger('SP') |
tuple | main_logger = logging.getLogger("SP.run_parser") |
tuple | server_running = SocketServer_Client.Connect() |
tuple | received = send_to_server( option.method, option.action, option.list_stock ) |
Standalone program, implement all possible functions with or without the Server running.
If the server is running call the server functions (not always need to query the web page)
or make a call to Parserstocks through UpdateStocks
Should be called simply from apache/ROOT_application with a minimum wrapper
Return a simple string to the caller
Last Changed $Id$
def Run_Parsers.CallYahooCSV | ( | dict_stocks, | |
stock, | |||
action | |||
) |
Make calls to YahooAPI module.
Not tested yet, work only for one stock
Implements:
Definition at line 208 of file Run_Parsers.py.
def Run_Parsers.send_to_server | ( | method, | |
action, | |||
list_stock, | |||
header = False |
|||
) |
Get the last instantaneous data of the list of stocks.
Only used with Boursorama at this point
method
list_stock | of the stock symbols |
action | |
header | if True print a header before the data |
Definition at line 154 of file Run_Parsers.py.
tuple Run_Parsers.arg_parser = argparse.ArgumentParser(description="Main executable for parsing data from web page") |
Definition at line 255 of file Run_Parsers.py.
string Run_Parsers.help = 'method GET / FORCE / UPDATE_CSV / TEST_SERVER' |
Definition at line 262 of file Run_Parsers.py.
tuple Run_Parsers.logger = logging.getLogger('SP') |
Definition at line 293 of file Run_Parsers.py.
tuple Run_Parsers.main_logger = logging.getLogger("SP.run_parser") |
Definition at line 294 of file Run_Parsers.py.
tuple Run_Parsers.option = arg_parser.parse_args() |
Definition at line 276 of file Run_Parsers.py.
tuple Run_Parsers.received = send_to_server( option.method, option.action, option.list_stock ) |
Definition at line 328 of file Run_Parsers.py.
tuple Run_Parsers.server_running = SocketServer_Client.Connect() |
Definition at line 303 of file Run_Parsers.py.
Run_Parsers.verbose = None |
Definition at line 42 of file Run_Parsers.py.