# Path: tweedr/models/metadata.py



from sqlalchemy import Column
from sqlalchemy.dialects import mysql
from sqlalchemy.ext.declarative import declarative_base
from tweedr.models.metadata import metadata
    DamageClassification,
    TokenizedLabel,
    UniformSample,
    Label,
    KeywordSample,
    Tweet,
)
'''




class BaseMixin(object):
    def __json__(self):
        '''This method serves to both clone the record (copying its values)
        as well as filter out the special sqlalchemy key (_sa_instance_state)
        '''
        return dict((k, v) for k, v in self.__dict__.items() if k != '_sa_instance_state')

    def __unicode__(self):
        type_name = self.__class__.__name__
        pairs = [u'%s=%s' % (k, v) for k, v in self.__json__().items()]
        return u'<{type_name} {pairs}>'.format(type_name=type_name, pairs=u' '.join(pairs))

    def __str__(self):
        return unicode(self).encode('utf-8')

    def __repr__(self):
        return str(self)


# Path: tweedr/models/metadata.py



# Path: tweedr/models/schema.py
from sqlalchemy import Column
from sqlalchemy.dialects import mysql
from sqlalchemy.ext.declarative import declarative_base
from tweedr.models.metadata import metadata

    DamageClassification,
    TokenizedLabel,
    UniformSample,
    Label,
    KeywordSample,
    Tweet,
)
'''




class BaseMixin(object):
    def __json__(self):
        '''This method serves to both clone the record (copying its values)
        as well as filter out the special sqlalchemy key (_sa_instance_state)
        '''
        return dict((k, v) for k, v in self.__dict__.items() if k != '_sa_instance_state')

    def __unicode__(self):
        type_name = self.__class__.__name__
        pairs = [u'%s=%s' % (k, v) for k, v in self.__json__().items()]
        return u'<{type_name} {pairs}>'.format(type_name=type_name, pairs=u' '.join(pairs))

    def __str__(self):
        return unicode(self).encode('utf-8')

    def __repr__(self):
        return str(self)


Base = declarative_base(metadata=metadata, cls=BaseMixin)