Пример #1
0
    def __init__(self, metadata, migrate=True, target_version=None):
        if not isinstance(metadata, dict):
            raise TypeError("{} is not a dictionary".format(metadata))
        starting_version = metadata.get('ver', '0.0.1')

        StructuredDict.__init__(self, metadata, starting_version, migrate,
                                target_version)
Пример #2
0
    def __init__(self, fee):
        self._versions = [('0.0.1', fee_schemas.VER_001, None)]

        StructuredDict.__init__(self, fee, fee.get('ver', '0.0.1'))

        self.currency_symbol = self['currency']
        self.amount = self._get_amount()
        self.address = self['address']
Пример #3
0
    def __init__(self, fee):
        self._versions = [
            ('0.0.1', fee_schemas.VER_001, None)
        ]

        StructuredDict.__init__(self, fee, fee.get('ver', '0.0.1'))

        self.currency_symbol = self.keys()[0]
        self.amount = self._get_amount()
        self.address = self[self.currency_symbol]['address']
Пример #4
0
    def __init__(self, metadata, migrate=True, target_version=None):
        starting_version = metadata.get('ver', '0.0.1')

        StructuredDict.__init__(self, metadata, starting_version, migrate,
                                target_version)
Пример #5
0
    def __init__(self, metadata, migrate=True, target_version=None):
        if not isinstance(metadata, dict):
            raise TypeError("{} is not a dictionary".format(metadata))
        starting_version = metadata.get('ver', '0.0.1')

        StructuredDict.__init__(self, metadata, starting_version, migrate, target_version)