# Path: dlstats/version.py
# VERSION = (0, 8, 6)
# def version_str():
# 
# Path: dlstats/constants.py
# CACHE_URL = os.environ.get('WIDUKIND_CACHE_URL', 'simple') #redis://localhost:6379/0


import atexit
import tempfile
import pprint
import os
import sys
import contextlib
import gridfs
import click
            import requests_cache
from widukind_common.utils import get_mongo_url, get_mongo_client, configure_logging
from widukind_common.mongolock import MongoLock, MongoLockLocked
from widukind_common import errors
from dlstats import version
from dlstats.constants import CACHE_URL
            from widukind_common import debug
        from logging import FileHandler
        from dlstats import cache

        self.mongo_url = mongo_url
        self.verbose = verbose
        self.debug = debug
        self.silent = silent
        self.pretty = pretty
        self.quiet = quiet
        self.trace = trace
        
        self.cache_enable = cache_enable
        
        self.requests_cache_enable = requests_cache_enable
        self.requests_cache_path = requests_cache_path
        self.requests_cache_expire = requests_cache_expire
        
        self.log_level = log_level
        self.log_config = log_config
        self.log_file = log_file
        
        if self.verbose and log_level != "DEBUG":
            self.log_level = 'INFO'
        
        self.locker = None
        
        self.client_mongo = None
        self.db_mongo = None
        self.client_es = None
        self.fs_mongo = None
        
        self.logger = configure_logging(debug=self.debug, 

# Path: dlstats/version.py
# VERSION = (0, 8, 6)
# def version_str():
# 
# Path: dlstats/constants.py
# CACHE_URL = os.environ.get('WIDUKIND_CACHE_URL', 'simple') #redis://localhost:6379/0


# Path: dlstats/client.py
import atexit
import tempfile
import pprint
import os
import sys
import contextlib
import gridfs
import click
            import requests_cache
from widukind_common.utils import get_mongo_url, get_mongo_client, configure_logging
from widukind_common.mongolock import MongoLock, MongoLockLocked
from widukind_common import errors
from dlstats import version
from dlstats.constants import CACHE_URL
            from widukind_common import debug
        from logging import FileHandler
        from dlstats import cache


        self.mongo_url = mongo_url
        self.verbose = verbose
        self.debug = debug
        self.silent = silent
        self.pretty = pretty
        self.quiet = quiet
        self.trace = trace
        
        self.cache_enable = cache_enable
        
        self.requests_cache_enable = requests_cache_enable
        self.requests_cache_path = requests_cache_path
        self.requests_cache_expire = requests_cache_expire
        
        self.log_level = log_level
        self.log_config = log_config
        self.log_file = log_file
        
        if self.verbose and log_level != "DEBUG":
            self.log_level = 'INFO'
        
        self.locker = None
        
        self.client_mongo = None
        self.db_mongo = None
        self.client_es = None
        self.fs_mongo = None
        
        self.logger = configure_logging(debug=self.debug, 

                                config_file=self.log_config, 