pycouchdb1.17.1
Published
Modern pure python CouchDB Client.
pip install pycouchdb
Package Downloads
Authors
Project URLs
Requires Python
>=3.9
py-couchdb
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.
Advantages of py-couchdb
- 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'
Installation
To install py-couchdb, simply:
pip install pycouchdb
Documentation
Documentation is available at http://pycouchdb.readthedocs.org.
Logging
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.
Test
To test py-couchdb, simply run:
pytest -v --doctest-modules --cov pycouchdb