= CouchDB =
 * https://couchdb.apache.org/
 * https://cwiki.apache.org/confluence/display/COUCHDB/Introduction
'''Clustered database''' that allows you to run a single logical database server on any number of servers or VMs. 

Seamless '''multi-master sync''', that scales from Big Data to Mobile, with an intuitive HTTP/JSON API and designed for Reliability.

Default TCP port is 5984. 

== Docker instances ==
{{{#!highlight bash
docker run -p 5984:5984 --rm -d --name my-couchdb-1 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password apache/couchdb:latest
docker run -p 5985:5984 --rm -d --name my-couchdb-2 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password apache/couchdb:latest
docker run -p 5986:5984 --rm -d --name my-couchdb-3 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password apache/couchdb:latest

docker network create couchnet
docker network connect couchnet my-couchdb-1
docker network connect couchnet my-couchdb-2 
docker network connect couchnet my-couchdb-3
docker ps

curl localhost:5984
curl localhost:5985
curl localhost:5986

docker exec -it my-couchdb-1 sh -c 'apt update &&
apt install -y net-tools  inetutils-ping nano vim'
docker exec -it my-couchdb-2 sh -c 'apt update &&
apt install -y net-tools  inetutils-ping nano vim'
docker exec -it my-couchdb-3 sh -c 'apt update &&
apt install -y net-tools  inetutils-ping nano vim'

}}}

== python CouchDB lib ==
 *  pip3 install CouchDB
 * https://couchdb-python.readthedocs.io/en/latest/client.html#
{{{#!highlight python
import couchdb
server = couchdb.client.Server('http://user:pwd@example.org/dbx/')
db = server['dbtest']
print( db.info() )
doc = db['00998876870c1935a6d2de43ade4']
print( doc )

for row in db.view('_all_docs'):
  print(row.id)
}}}