ServerPortfolio  2.0
Python parsers and server
 All Classes Namespaces Files Functions Variables Properties Pages
Namespaces | Functions | Variables
Utils.py File Reference

Go to the source code of this file.

Namespaces

 serverportfolio.Utils
 Utility functions.
 

Functions

def serverportfolio.Utils.to_list
 Always return a list of strings. More...
 
def serverportfolio.Utils.stringToEAction
 Always return a valid EAction from an Eaction or an EAction.name. More...
 
def serverportfolio.Utils.timestamp_to_string
 Time function. More...
 
def serverportfolio.Utils.string_to_timestamp
 opposite all seems to be in local time, like the rest of the application (1970-01-01 00:00:00 = -3600) http://stackoverflow.com/questions/9637838/convert-string-date-to-timestamp-in-python More...
 
def serverportfolio.Utils.pretty_dict
 Nice string output of python dictionary or list of dictionaries. More...
 

Variables

dictionary serverportfolio.Utils.dict1
 
dictionary serverportfolio.Utils.dict2 = {'symbol': 'CAC40', 'InstValue ': {'volume': 898.0, 'plusbas': 4224.34, 'state': 'OPEN', 'ouverture': 4294.05, 'variation': -0.22, 'plushaut': 4311.0, 'time': '14:36:00', 'date': '2015-01-02', 'value': 4263.39}}
 
list serverportfolio.Utils.dict3 = [{'symbol': '"GSZ.PA"', 'list_dict': ['Fundamental'], 'Fundamental': {'other': {}, 'MarketCapitalization': '45.753B', 'BVPS': 21.442, 'SharesOwned': '-', 'PriceBook': 0.9, 'PEG': 'N/A\r', 'DividendYield': 1.67, 'PER': 'N/A'}}]
 
list serverportfolio.Utils.dict4 = [{'symbol': '"GSZ.PA"', 'list_dict': ['Fundamental'], 'Fundamental': {'other': {}, 'MarketCapitalization': '45.753B', 'BVPS': 21.442, 'SharesOwned': '-', 'PriceBook': 0.9, 'PEG': 'N/A\r', 'DividendYield': 1.67, 'PER': 'N/A'}},{'symbol': '"GSZ2.PA"', 'list_dict': ['Fundamental'], 'Fundamental': {'other': {'subother':'toto', 'subother2':'toto2'}, 'MarketCapitalization': '45.753B', 'BVPS': 21.442, 'SharesOwned': '-', 'PriceBook': 0.9, 'PEG': 'N/A\r', 'DividendYield': 1.67, 'PER': 'N/A'}}]
 
tuple serverportfolio.Utils.str_pretty = pretty_dict( dict4 )