Modern pure python CouchDB Client.
Currently there are several libraries in python to connect to couchdb. Why one more? It's very simple.
All seems not be maintained, all libraries used standard Python libraries for http requests.
- Use requests for http requests (much faster than the standard library)
- CouchDB 2.x and CouchDB 3.x compatible
- Also compatible with pypy.
Example:
>>> import pycouchdb
>>> server = pycouchdb.Server("http://admin:admin@localhost:5984/")
>>> server.info()['version']
'1.2.1'To install py-couchdb, simply:
pip install pycouchdbDocumentation is available at http://pycouchdb.readthedocs.org.
py-couchdb is silent by default. Enable its standard-library logger from your application when needed:
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger("pycouchdb").setLevel(logging.DEBUG)DEBUG records include safe HTTP and database-operation metadata; INFO records
summarize bulk results. Request and response bodies, credentials, headers,
hostnames, and query parameter values are never logged. See the
logging guide for
formatting and dictConfig examples.
To test py-couchdb, simply run:
pytest -v --doctest-modules --cov pycouchdb