Skip to content
Snippets Groups Projects
Commit 48131472 authored by evana's avatar evana
Browse files

Upload New File

parent f2955bd6
No related branches found
No related tags found
1 merge request!10Patch 2
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)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment