title: Deleting all documents in CouchDB
body: <p>I have a database and I want to truncate all records, I know it is possible to just add a _deleted key to every document or call db.delete() on CouchDB-python library. I am using the <code>delete</code> of couchdb-python but it does not seem to work when I fetch all the documents and then call .delete on each document excluding design documents. </p>
  
  <p>Here is my code. </p>
  
  <pre><code>docs = get_db().view('_all_docs', include_docs=True)
  for i in docs:
      if not(i['id'].startswith('_')):
          get_db().delete(i)
  </code></pre>
  
  <p>This is the error. Because the result from <code>_all_docs</code> is returning a <code>id</code> instead <code>_id</code>. </p>
  
  <pre><code>File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\couchdb\client.py", line 625, in delete
  if doc['_id'] is None:
  KeyError: '_id'
  </code></pre>
  
  <p>My question is how do I fetch all documents that returns <code>_id</code> instead of just the <code>id</code>? Or is there any way around this? </p>