# Path: will/utils.py
# class Bunch(dict):
#     def __init__(self, **kw):
#         dict.__init__(self, kw)
#         self.__dict__ = self
# 
#     def __getstate__(self):
#         return self
# 
#     def __setstate__(self, state):
#         self.update(state)
#         self.__dict__ = self


import datetime
import hashlib
import logging
from pytz import timezone as pytz_timezone
from will.utils import Bunch
        if "timestamp" in kwargs:
            self.timestamp = kwargs["timestamp"]
        else:
            self.timestamp = datetime.datetime.now()

        h = hashlib.md5()
        h.update(self.timestamp.strftime("%s").encode("utf-8"))
        h.update(self.type.encode("utf-8"))
        self.hash = h.hexdigest()
        if not "original_incoming_event_hash" in kwargs:
            if hasattr(self, "original_incoming_event") and hasattr(self.original_incoming_event, "hash"):
                self.original_incoming_event_hash = self.original_incoming_event.hash
            else:
                self.original_incoming_event_hash = self.hash


class Person(Bunch):
    will_is_person = True
    will_internal_type = "Person"
    REQUIRED_FIELDS = [
        "id",
        "handle",
        "mention_handle",
        "source",
        "name",
        "first_name"
        # "timezone",
    ]

    def __init__(self, *args, **kwargs):

# Path: will/utils.py
# class Bunch(dict):
#     def __init__(self, **kw):
#         dict.__init__(self, kw)
#         self.__dict__ = self
# 
#     def __getstate__(self):
#         return self
# 
#     def __setstate__(self, state):
#         self.update(state)
#         self.__dict__ = self


# Path: will/abstractions.py
import datetime
import hashlib
import logging
from pytz import timezone as pytz_timezone
from will.utils import Bunch

        if "timestamp" in kwargs:
            self.timestamp = kwargs["timestamp"]
        else:
            self.timestamp = datetime.datetime.now()

        h = hashlib.md5()
        h.update(self.timestamp.strftime("%s").encode("utf-8"))
        h.update(self.type.encode("utf-8"))
        self.hash = h.hexdigest()
        if not "original_incoming_event_hash" in kwargs:
            if hasattr(self, "original_incoming_event") and hasattr(self.original_incoming_event, "hash"):
                self.original_incoming_event_hash = self.original_incoming_event.hash
            else:
                self.original_incoming_event_hash = self.hash


class Person(Bunch):
    will_is_person = True
    will_internal_type = "Person"
    REQUIRED_FIELDS = [
        "id",
        "handle",
        "mention_handle",
        "source",
        "name",
        "first_name"
        # "timezone",
    ]

    def __init__(self, *args, **kwargs):

        super(Person, self).__init__(*args, **kwargs)