本文整理汇总了Python中api.API.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python API.__init__方法的具体用法?Python API.__init__怎么用?Python API.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.API
的用法示例。
在下文中一共展示了API.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self, id=None):
DB_CON.register([TopicDoc])
datastroe = DB_CON[DB_NAME]
col_name = TopicDoc.__collection__
collection = datastroe[col_name]
doc = collection.TopicDoc()
API.__init__(self, id=id, col_name=col_name, collection=collection, doc=doc)
示例2: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self):
DB_CON.register([UserDoc])
datastore = DB_CON[DB_NAME]
col_name = UserDoc.__collection__
collection = datastore[col_name]
doc = collection.UserDoc()
API.__init__(self, col_name=col_name, collection=collection, doc=doc)
示例3: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self, db_name=DB_NAME):
DB_CON.register([EventDoc])
datastore = DB_CON[db_name]
col_name = EventDoc.__collection__
collection = datastore[col_name]
doc = collection.EventDoc()
API.__init__(self, db_name=db_name, col_name=col_name, collection=collection, doc=doc)
示例4: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self):
DB_CON.register([CollectDoc])
datastore = DB_CON[DB_NAME]
col_name = CollectDoc.__collection__
collection = datastore[col_name]
doc = collection.CollectDoc()
self.vol = Volume()
API.__init__(self, col_name=col_name, collection=collection, doc=doc)
示例5: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self):
DB_CON.register([StaffDoc])
datastore = DB_CON[DB_NAME]
col_name = StaffDoc.__collection__
collection = datastore[col_name]
doc = collection.StaffDoc()
self.p = Permission()
API.__init__(self, col_name=col_name, collection=collection, doc=doc)
示例6: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self):
DB_CON.register([TimeLineDoc])
datastore = DB_CON[DB_NAME]
col_name = TimeLineDoc.__collection__
collection = datastore[col_name]
doc = collection.TimeLineDoc()
self.staff = StaffAPI()
API.__init__(self, col_name=col_name, collection=collection, doc=doc)
示例7: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self):
DB_CON.register([ItemDoc])
datastore = DB_CON[DB_NAME]
col_name = ItemDoc.__collection__
collection = datastore[col_name]
doc = collection.ItemDoc()
self.rpl = Reply()
self.stf = Staff()
self.alt = Alert()
API.__init__(self, col_name=col_name, collection=collection, doc=doc)
示例8: __init__
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import __init__ [as 别名]
def __init__(self):
API.__init__(self, url, key)
self.beer_not_found = app.config['NO_BEER_FOUND']