# Path: pydal/_compat.py
# PY2 = sys.version_info[0] == 2
#     def implements_bool(cls):
#     def implements_iterator(cls):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def to_unicode(obj, charset="utf-8", errors="strict"):
#     class metaclass(meta):
# 
# Path: pydal/helpers/serializers.py
# class Serializers(object):
#     def _json_parse(self, o):
#     def __getattr__(self, name):
#     def json(self, value):
#     def yaml(self, value):


import copy
import marshal
import struct
import threading
import time
import traceback
            import types
from .._compat import (
    PY2,
    exists,
    copyreg,
    implements_bool,
    iterkeys,
    itervalues,
    iteritems,
    to_bytes,
    long,
)
from .._globals import THREAD_LOCAL
from .serializers import serializers
    def values(self):
        return self._values.values()

    def itervalues(self):
        return itervalues(self._values)

    def items(self):
        return self._values.items()

    def iteritems(self):
        return iteritems(self._values)

    def op_values(self):
        return [(self._fields[key], value) for key, value in iteritems(self._values)]

    def __repr__(self):
        return "<OpRow %s>" % repr(self._values)


class Serializable(object):
    def as_dict(self, flat=False, sanitize=True):
        return self.__dict__

    def as_xml(self, sanitize=True):
        return serializers.xml(self.as_dict(flat=True, sanitize=sanitize))

    def as_json(self, sanitize=True):
        return serializers.json(self.as_dict(flat=True, sanitize=sanitize))

    def as_yaml(self, sanitize=True):

# Path: pydal/_compat.py
# PY2 = sys.version_info[0] == 2
#     def implements_bool(cls):
#     def implements_iterator(cls):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def to_unicode(obj, charset="utf-8", errors="strict"):
#     class metaclass(meta):
# 
# Path: pydal/helpers/serializers.py
# class Serializers(object):
#     def _json_parse(self, o):
#     def __getattr__(self, name):
#     def json(self, value):
#     def yaml(self, value):


# Path: pydal/helpers/classes.py
import copy
import marshal
import struct
import threading
import time
import traceback
            import types
from .._compat import (
    PY2,
    exists,
    copyreg,
    implements_bool,
    iterkeys,
    itervalues,
    iteritems,
    to_bytes,
    long,
)
from .._globals import THREAD_LOCAL
from .serializers import serializers

    def values(self):
        return self._values.values()

    def itervalues(self):
        return itervalues(self._values)

    def items(self):
        return self._values.items()

    def iteritems(self):
        return iteritems(self._values)

    def op_values(self):
        return [(self._fields[key], value) for key, value in iteritems(self._values)]

    def __repr__(self):
        return "<OpRow %s>" % repr(self._values)


class Serializable(object):
    def as_dict(self, flat=False, sanitize=True):
        return self.__dict__

    def as_xml(self, sanitize=True):
        return serializers.xml(self.as_dict(flat=True, sanitize=sanitize))

    def as_json(self, sanitize=True):
        return serializers.json(self.as_dict(flat=True, sanitize=sanitize))

    def as_yaml(self, sanitize=True):

        return serializers.yaml(self.as_dict(flat=True, sanitize=sanitize))