Select Git revision
try-couchdb.py 343 B
import couchdb
import json
couch = couchdb.Server('http://127.0.0.1:5984')
couch.resource.credentials = ("admin", "960115")
if 'tweets' not in couch:
db = couch.create('tweets')
db = couch['tweets']
with open('tweetsWA.json',encoding='utf-8') as jsonfile:
for row in jsonfile:
db_entry = json.loads(row)
db.save(db_entry)