Share and Money Management  0.16
Functions | Variables
smm.db_setup Namespace Reference

Database schema and the initial data set as well as functions to setup a fresh database using the schema and initial data set. More...

Functions

def load_initial_data ()
 Loads the initial dataset into the database. More...
 
def create_structure ()
 Creates all needed tables to store the objects inside. More...
 

Variables

dictionary exchange_list
 Symbols and names of the most known exchanges. More...
 
list currencies_list
 List the most known currencies. More...
 
list indices_list
 List the most known indices. More...
 
list shares_list
 List of some wellknown (German) shares. More...
 

Detailed Description

Database schema and the initial data set as well as functions to setup a fresh database using the schema and initial data set.

Author
Carsten Grohmann <mail (at) carstengrohmann (dot) de>
License:
GPL version 2.0

Function Documentation

◆ create_structure()

def smm.db_setup.create_structure ( )

Creates all needed tables to store the objects inside.

See also
smm.objects.Exchange, smm.objects.Currency, smm.objects.Share smm.objects.DailyQuote
Note
Function doesn't catch any exception

Referenced by gui.dialogs.DlgPreferences.OnCreateDatabase(), tests.test_misc.TestMisc.setUp(), tests.test_objects.TestObjects.setUp(), and tests.test_database.TestDatabase.test_filling().

Here is the caller graph for this function:

◆ load_initial_data()

def smm.db_setup.load_initial_data ( )

Loads the initial dataset into the database.

Returns
True on success
See also
smm.objects.Exchange, smm.objects.Currency, smm.objects.Share smm.objects.DailyQuote, exchange_list and indices_list

Referenced by gui.dialogs.DlgPreferences.OnCreateDatabase(), tests.test_misc.TestMisc.setUp(), tests.test_objects.TestObjects.setUp(), and tests.test_database.TestDatabase.test_filling().

Here is the caller graph for this function:

Variable Documentation

◆ currencies_list

list smm.db_setup.currencies_list
Initial value:
1 = [
2  (u'CHF', u'Fr.', u'Schweizer Franken'),
3  (u'RUB', None, u'Russischer Rubel'),
4  (u'EUR', u'\N{EURO SIGN}', u'Euro'),
5  (u'GBP', u'\N{POUND SIGN}', u'Pfund Sterling'),
6  (u'USD', u'\N{DOLLAR SIGN}', u'US-Dollar'),
7  (u'JPY', u'\N{YEN SIGN}', u'Yen'),
8  (u'CAD', 'C $', u'Kanadischer Dollar'),
9  (u'AUD', 'AU $', u'Australischer Dollar'),
10  (u'HKD', 'HK$', u'Hongkong Dollar'),
11  (u'XAG', None, u'Silber'),
12  (u'XAU', None, u'Gold'),
13  (u'XPD', None, u'Palladium'),
14  (u'XPT', None, u'Platin'),
15 # (u'XTS', None, u'Für Testzwecke verwendeter Code'),
16  (u'XXX', None, u'Transaktion ohne Währung'), # pylint: disable=W0511
17  ]

List the most known currencies.

◆ exchange_list

dictionary smm.db_setup.exchange_list

Symbols and names of the most known exchanges.

Note
The list of exchanges are from http://finance.yahoo.com/exchanges

◆ indices_list

list smm.db_setup.indices_list
Initial value:
1 = [
2  (u'DAX (Performance-Index)', u'DAX', u'DE0008469008', u'846900'),
3  (u'DAX (Kurs-Index)', None, u'DE0008467440', u'846744'),
4  (u'DJ Euro Stoxx 50', u'SX5E', u'EU0009658145', None),
5  (u'MDAX', u'MDAX', u'DE0008467416', u'846741'),
6  (u'SDAX', u'SDXP', u'DE0009653386', u'965338'),
7  (u'TecDax', u'TDXP', u'DE0007203275', u'720327'),
8  ]

List the most known indices.

Entries:

  • Name
  • Symbol
  • ISIN
  • WKN

◆ shares_list

list smm.db_setup.shares_list

List of some wellknown (German) shares.

Entries:

  • Name
  • Symbol
  • ISIN
  • WKN