Skip to content
Snippets Groups Projects
Select Git revision
  • 9f1932337cf7e05a86a2f2d36480541db6bd889b
  • master default protected
2 results

views.py

Blame
  • 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)