# Path: zdict/exceptions.py
# class QueryError(Exception):
# class NotFoundError(Exception):
# class NoNetworkError(Exception):
# class TimeoutError(Exception):
# class UnexpectedError(Exception):
# class APIKeyError(Exception):
#     def __init__(self, word, status_code):
#     def __str__(self):
#     def __init__(self, word):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __init__(self):
#     def __init__(self, msg):
#     def __str__(self):
# 
# Path: zdict/models.py
# class Record(peewee.Model):
#     class Meta:
# 
# Path: zdict/utils.py
# class Color(metaclass=ColorConst):
#     _force_color = False
# 
#     @classmethod
#     def set_force_color(cls, force_color=True):
#         cls._force_color = force_color
# 
#     @classmethod
#     def format(self, s='', color='org', indent=0):
#         '''
#         :type s: str
#         :param s: message
#         :param color: predefined color name, e,g,: red, RED.
#             Using 'l' prefix for bright color, e.g.: lred, lwhite.
#             It's case-insensitive.
# 
#             If stdout isn't a tty, the color option will be ignored.
#         '''
#         colorize = self._force_color or sys.stdout.isatty()
# 
#         return '{indent}{color}{s}{org}'.format(
#             indent=' ' * indent,
#             color=getattr(self, color, '') if colorize else '',
#             s=s,
#             org=self.ORG if colorize else '',
#         )
# 
#     @classmethod
#     def print(self, *args, end='\n', **kwargs):
#         print(self.format(*args, **kwargs), end=end)


import abc
import json
import requests
            import traceback
            import sys
from zdict import exceptions
from zdict.models import Record, db
from zdict.utils import Color
            from bs4 import BeautifulSoup




class DictBase(metaclass=abc.ABCMeta):

    REQUIRED_TABLE = (
        Record,
    )

    def __init__(self, args):
        self.args = args
        self.color = Color()
        self.db = db

        try:
            self.db.connection()
        except Exception:

# Path: zdict/exceptions.py
# class QueryError(Exception):
# class NotFoundError(Exception):
# class NoNetworkError(Exception):
# class TimeoutError(Exception):
# class UnexpectedError(Exception):
# class APIKeyError(Exception):
#     def __init__(self, word, status_code):
#     def __str__(self):
#     def __init__(self, word):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __init__(self):
#     def __init__(self, msg):
#     def __str__(self):
# 
# Path: zdict/models.py
# class Record(peewee.Model):
#     class Meta:
# 
# Path: zdict/utils.py
# class Color(metaclass=ColorConst):
#     _force_color = False
# 
#     @classmethod
#     def set_force_color(cls, force_color=True):
#         cls._force_color = force_color
# 
#     @classmethod
#     def format(self, s='', color='org', indent=0):
#         '''
#         :type s: str
#         :param s: message
#         :param color: predefined color name, e,g,: red, RED.
#             Using 'l' prefix for bright color, e.g.: lred, lwhite.
#             It's case-insensitive.
# 
#             If stdout isn't a tty, the color option will be ignored.
#         '''
#         colorize = self._force_color or sys.stdout.isatty()
# 
#         return '{indent}{color}{s}{org}'.format(
#             indent=' ' * indent,
#             color=getattr(self, color, '') if colorize else '',
#             s=s,
#             org=self.ORG if colorize else '',
#         )
# 
#     @classmethod
#     def print(self, *args, end='\n', **kwargs):
#         print(self.format(*args, **kwargs), end=end)


# Path: zdict/dictionary.py
import abc
import json
import requests
            import traceback
            import sys
from zdict import exceptions
from zdict.models import Record, db
from zdict.utils import Color
            from bs4 import BeautifulSoup





class DictBase(metaclass=abc.ABCMeta):

    REQUIRED_TABLE = (
        Record,
    )

    def __init__(self, args):
        self.args = args
        self.color = Color()
        self.db = db

        try:
            self.db.connection()
        except Exception:

            self.db = None