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

Database schema and the initial data set as well as functions to set up 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 set up 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 ("CHF", "Fr.", "Schweizer Franken"),
3 ("RUB", None, "Russischer Rubel"),
4 ("EUR", "\N{EURO SIGN}", "Euro"),
5 ("GBP", "\N{POUND SIGN}", "Pfund Sterling"),
6 ("USD", "\N{DOLLAR SIGN}", "US-Dollar"),
7 ("JPY", "\N{YEN SIGN}", "Yen"),
8 ("CAD", "C $", "Kanadischer Dollar"),
9 ("AUD", "AU $", "Australischer Dollar"),
10 ("HKD", "HK$", "Hongkong Dollar"),
11 ("XAG", None, "Silber"),
12 ("XAU", None, "Gold"),
13 ("XPD", None, "Palladium"),
14 ("XPT", None, "Platin"),
15 # (u'XTS', None, u'Für Testzwecke verwendeter Code'),
16 ("XXX", None, "Transaktion ohne Währung"), # pylint: disable=fixme
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 ("DAX (Performance-Index)", "DAX", "DE0008469008", "846900"),
3 ("DAX (Kurs-Index)", None, "DE0008467440", "846744"),
4 ("DJ Euro Stoxx 50", "SX5E", "EU0009658145", None),
5 ("MDAX", "MDAX", "DE0008467416", "846741"),
6 ("SDAX", "SDXP", "DE0009653386", "965338"),
7 ("TecDax", "TDXP", "DE0007203275", "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