ServerPortfolio
2.0
Python parsers and server
|
Class template for invalid stocks, if a stock symbol is not found in the configuration file. More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | is_valid |
def | time_to_open |
Override method of base class, return None. More... | |
def | print_stock |
Override method of base class, return string containing ERROR. More... | |
Public Member Functions inherited from serverportfolio.Stock.Stock | |
def | __init__ |
Constructor. More... | |
def | is_valid |
Return if the Stock is valid. More... | |
def | add_dict_stock |
Function to update Stock with the data extracted by the Parsers. More... | |
def | pre_process |
Pre-processing only for HistPrice, may extend to all 'csv' later. More... | |
def | post_process |
Post process the update: check, validate and save the data after one (unique) action is performed. More... | |
def | time_to_open |
Compute in how long time the stock will open, to test for setting the state 'WAIT_OPEN' in AutoParsers. More... | |
def | test_ML_done |
Check date and time for ML(Marche libre) specifically. More... | |
def | print_stock |
Create a one line string with the values stored in a dictionary. More... | |
def | read_xml |
ReadXML data from file into internal xml_dict. More... | |
def | write_xml |
Check the validity of the new retrieved data (in _dict_stock), store update in _dict_interactive. More... | |
def | get_action |
Return the action template part from _dict_stock or one of its data value. More... | |
def | set_action |
Fill _dict_stock['action'] with new_data. More... | |
def | get_config |
return the 'config' dictionary or one of its key from _dict_stock More... | |
def | saved_as |
query the entry 'config' : 'save' of an action If specifc is indicated return a boolean value More... | |
def | get_dict_xml |
Return the dictionary of data for XML input/output. More... | |
def | set_dict_xml |
Similar to set_action with extended dictionary. More... | |
def | get_error |
Return a formatted error. More... | |
def | save_inst_value |
Save instantaneous values into a file. More... | |
def | last_CSV |
Get the date of the last data from the file saved on disk. More... | |
def | save_hist_price |
Save historical price in CSV format in ROOT_data/hp/symbol.DAY.CSV Use C++ wrapPyStock.UpdateCSV function. More... | |
def | symbol |
Getter for the symbol. More... | |
def | symbol |
Setter raises an exception, it cannot be changed. More... | |
def | get_state |
Getter function for the state. More... | |
def | set_state |
def | get_market |
Get the market on which the stock belongs. More... | |
def | get_last_modification |
Return the last modification of the Instantaneous value. More... | |
Private Attributes | |
_logger | |
Additional Inherited Members | |
Static Public Member Functions inherited from serverportfolio.Stock.Stock | |
def | to_list |
Similar to Utils.to_list but deals with Stock or list of Stocks. More... | |
Public Attributes inherited from serverportfolio.Stock.Stock | |
valid_update | |
Validation is done by a ValidStockUpdate object. More... | |
Static Public Attributes inherited from serverportfolio.Stock.Stock | |
tuple | sub_tree_action = self._create_xml_action( key_action, value_action ) |
Properties inherited from serverportfolio.Stock.Stock | |
state = property(get_state, set_state) | |
Define both setter and getter, can use stock.state = new_state or print stock.state. More... | |
Class template for invalid stocks, if a stock symbol is not found in the configuration file.
If mistakes are done in some input, the code can continue to run without breaking. Test could be done in DictStocks for errors.
def serverportfolio.Stock.InvalidStock.__init__ | ( | self, | |
symbol, | |||
dict_static_invalid | |||
) |
def serverportfolio.Stock.InvalidStock.print_stock | ( | self, | |
action | |||
) |
Override method of base class, return string containing ERROR.
Definition at line 1212 of file Stock.py.
References serverportfolio.Parsers.YahooCSV.YahooCSV.symbol, and serverportfolio.Stock.Stock.symbol().
def serverportfolio.Stock.InvalidStock.time_to_open | ( | self | ) |