本文整理匯總了Python中DBManager.DBManager.documentByUUID方法的典型用法代碼示例。如果您正苦於以下問題:Python DBManager.documentByUUID方法的具體用法?Python DBManager.documentByUUID怎麽用?Python DBManager.documentByUUID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.documentByUUID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: str
# 需要導入模塊: from DBManager import DBManager [as 別名]
# 或者: from DBManager.DBManager import documentByUUID [as 別名]
missingUUID += 1
for uuid in uuids:
if (uuid != None and uuid.text != None):
uuid = uuid.text
date = xml.findall("//PublicationStartDate")
if (date != None and len(date) > 0 and date[0] != None and date[0].text != None):
newFile.write(uuid + "," + date[0].text + "\n")
print "wrote " + uuid + "," + date[0].text
else:
newFile.write(uuid + "\n")
print "wrote " + uuid
try:
doc = conn.documentByUUID(uuid)
if (doc != None):
matches += 1
else:
noMatches += 1
except couchdb.http.ResourceNotFound:
noMatches += 1
newFile.close()
print str(docs) + " total docs"
print str(errors) + " Parse Errors"
print str(missingUUID) + " docs have no UUID"
print str(matches) + " matches"
print str(noMatches) + " not matches"