Share and Money Management 0.18devel
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
smm.objects.Currency Class Reference

Class to handle Currency data. More...

Inheritance diagram for smm.objects.Currency:

Public Member Functions

def __str__ (self)
 Returns the content of this instance as string. More...
 
- Public Member Functions inherited from smm.objects.SMMBaseObject
def __init__ (self, **kwargs)
 Initialise the instance and set attributes optionally. More...
 
def __repr__ (self)
 Returns the representation of this object as string. More...
 
def update (self, **kwargs)
 Update instance arguments. More...
 
def add2db (self)
 Add an object to the database. More...
 

Static Public Member Functions

def get (id=None, code=None, sign=None)
 Query Currency objects. More...
 
def getCount ()
 Returns the number of known currencies. More...
 

Static Public Attributes

dictionary arguments
 
string psTopic = "smm.currency"
 
 id = Int(default=AutoReload, primary=True)
 Unique ID for each object. More...
 
 code = Unicode()
 ISO 4217 currency code. More...
 
 sign = Unicode()
 Short sign. More...
 
 description = Unicode()
 Detailed description. More...
 
- Static Public Attributes inherited from smm.objects.SMMBaseObject
dictionary arguments
 Set of argument names for keyword arguments. More...
 
 encoding = sys.stdout.encoding or sys.getdefaultencoding()
 Encoding of all character strings. More...
 
 psTopic = None
 Publish Subscribe Topic for this class. More...
 
 id = None
 Unique ID for each object. More...
 

Static Private Attributes

string __storm_table__ = "t_currency"
 Use given table to store all of this class inside. More...
 

Detailed Description

Class to handle Currency data.

Test:
tests.test_objects.TestObjects.test_Currency_objects()

Member Function Documentation

◆ __str__()

def smm.objects.Currency.__str__ (   self)

Returns the content of this instance as string.

References smm.objects.Currency.code, smm.objects.SMMBaseObject.id, smm.objects.Exchange.id, smm.objects.Currency.id, smm.objects.Share.id, smm.objects.DailyQuote.id, smm.objects.Transaction.id, smm.objects.Watch.id, and smm.objects.Position.id.

Referenced by smm.objects.SMMBaseObject.__repr__().

Here is the caller graph for this function:

◆ get()

def smm.objects.Currency.get (   id = None,
  code = None,
  sign = None 
)
static

Query Currency objects.

There are two ways for querying objects:

  • Querying by id returns a Currency object or None
  • Querying by code returns a Currency object or None
  • Querying by sign returns a Currency object or None
  • Querying without parameters to get all Currency objects

The last way returns always a storm.store.ResultSet.

Parameters
idReturns a Currency object specified by id
codeReturns a Currency object specified by code
signReturns a Currency object specified by sign
Sorting:
The result are unsorted
Test:
tests.test_objects.TestObjects.test_Currency_get()

◆ getCount()

def smm.objects.Currency.getCount ( )
static

Returns the number of known currencies.

Member Data Documentation

◆ __storm_table__

string smm.objects.Currency.__storm_table__ = "t_currency"
staticprivate

Use given table to store all of this class inside.

◆ arguments

dictionary smm.objects.Currency.arguments
static
Initial value:
= {
"code",
"sign",
"description",
}

Referenced by smm.objects.SMMBaseObject._setAttrs().

◆ code

smm.objects.Currency.code = Unicode()
static

ISO 4217 currency code.

Referenced by smm.objects.Currency.__str__().

◆ description

smm.objects.Currency.description = Unicode()
static

Detailed description.

Referenced by smm.objects.Exchange.__str__().

◆ id

smm.objects.Currency.id = Int(default=AutoReload, primary=True)
static

◆ psTopic

string smm.objects.Currency.psTopic = "smm.currency"
static

◆ sign

smm.objects.Currency.sign = Unicode()
static

Short sign.


The documentation for this class was generated from the following file: