main.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:appbackendapi 作者: codesdk 项目源码 文件源码
def __init__(self, db_filename=None):
        credentials = GoogleCredentials.get_application_default()
        scoped_credentials = credentials.create_scoped(
            ['https://www.googleapis.com/auth/cloud-platform'])
        http = httplib2.Http()
        scoped_credentials.authorize(http)
        self.service = discovery.build('language', 'v1',
                                       http=http,
                                       credentials=credentials)

        # This list will store the entity information gleaned from the
        # image files.
        self.entity_info = []

        # This is the filename of the sqlite3 database to save to
        self.db_filename = db_filename or 'entities{}.db'.format(
            int(time.time()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号