# Path: datapackage_pipelines/utilities/lazy_dict.py
# class LazyDict(collections.MutableMapping):
# 
#     def __init__(self):
#         self._inner = None
#         self._dirty = False
# 
#     @property
#     def dirty(self):
#         return self._dirty
# 
#     @property
#     def inner(self):
#         self.__ensure()
#         return self._inner
# 
#     def _evaluate(self):
#         raise NotImplementedError()
# 
#     def __ensure(self):
#         if self._inner is None:
#             self._inner = self._evaluate()
# 
#     def __len__(self):
#         self.__ensure()
#         return len(self._inner)
# 
#     def __getitem__(self, item):
#         self.__ensure()
#         return self._inner.__getitem__(item)
# 
#     def __setitem__(self, key, value):
#         self.__ensure()
#         self._inner.__setitem__(key, value)
#         self._dirty = True
# 
#     def __delitem__(self, key):
#         self.__ensure()
#         self._inner.__delitem__(key)
#         self._dirty = True
# 
#     def __iter__(self):
#         self.__ensure()
#         return self._inner.__iter__()


import datetime
import json as _json
import decimal
import isodate
from .lazy_dict import LazyDict



if datetime.date(1, 1, 1).strftime('%04Y') == '4Y':
    DATE_F_FORMAT = '%Y-%m-%d'
    DATETIME_F_FORMAT = '%Y-%m-%d %H:%M:%S'
else:
    DATE_F_FORMAT = '%04Y-%m-%d'
    DATETIME_F_FORMAT = '%04Y-%m-%d %H:%M:%S'
DATE_FORMAT = DATE_F_FORMAT
DATETIME_FORMAT = DATETIME_F_FORMAT
TIME_FORMAT = '%H:%M:%S'

DATE_P_FORMAT = '%Y-%m-%d'
DATETIME_P_FORMAT = '%Y-%m-%d %H:%M:%S'
TIME_P_FORMAT = TIME_F_FORMAT = TIME_FORMAT



# Path: datapackage_pipelines/utilities/lazy_dict.py
# class LazyDict(collections.MutableMapping):
# 
#     def __init__(self):
#         self._inner = None
#         self._dirty = False
# 
#     @property
#     def dirty(self):
#         return self._dirty
# 
#     @property
#     def inner(self):
#         self.__ensure()
#         return self._inner
# 
#     def _evaluate(self):
#         raise NotImplementedError()
# 
#     def __ensure(self):
#         if self._inner is None:
#             self._inner = self._evaluate()
# 
#     def __len__(self):
#         self.__ensure()
#         return len(self._inner)
# 
#     def __getitem__(self, item):
#         self.__ensure()
#         return self._inner.__getitem__(item)
# 
#     def __setitem__(self, key, value):
#         self.__ensure()
#         self._inner.__setitem__(key, value)
#         self._dirty = True
# 
#     def __delitem__(self, key):
#         self.__ensure()
#         self._inner.__delitem__(key)
#         self._dirty = True
# 
#     def __iter__(self):
#         self.__ensure()
#         return self._inner.__iter__()


# Path: datapackage_pipelines/utilities/extended_json.py
import datetime
import json as _json
import decimal
import isodate
from .lazy_dict import LazyDict




if datetime.date(1, 1, 1).strftime('%04Y') == '4Y':
    DATE_F_FORMAT = '%Y-%m-%d'
    DATETIME_F_FORMAT = '%Y-%m-%d %H:%M:%S'
else:
    DATE_F_FORMAT = '%04Y-%m-%d'
    DATETIME_F_FORMAT = '%04Y-%m-%d %H:%M:%S'
DATE_FORMAT = DATE_F_FORMAT
DATETIME_FORMAT = DATETIME_F_FORMAT
TIME_FORMAT = '%H:%M:%S'

DATE_P_FORMAT = '%Y-%m-%d'
DATETIME_P_FORMAT = '%Y-%m-%d %H:%M:%S'
TIME_P_FORMAT = TIME_F_FORMAT = TIME_FORMAT



class LazyJsonLine(LazyDict):