Representation of a CouchDB server.
This class behaves like a dictionary of databases. For example, to get a
list of database names on the server, you can simply iterate over the
server object.
You can access existing databases using item access, specifying the database
name as the key:
|
|
__init__(self,
uri='http://localhost:5984/',
cache=None,
timeout=None)
Initialize the server object. |
|
|
|
|
__contains__(self,
name)
Return whether the server contains a database with the specified
name. |
|
|
|
|
__iter__(self)
Iterate over the names of all databases. |
|
|
|
|
__len__(self)
Return the number of databases. |
|
|
|
|
__nonzero__(self)
Return whether the server is available. |
|
|
|
|
|
|
|
__delitem__(self,
name)
Remove the database with the specified name. |
|
|
|
Database
|
__getitem__(self,
name)
Return a Database object representing the database with the
specified name. |
|
|
|
|
stats(self)
Database statistics. |
|
|
|
|
tasks(self)
A list of tasks currently active on the server. |
|
|
|
Database
|
create(self,
name)
Create a new database with the given name. |
|
|
|
|
delete(self,
name)
Delete the database with the specified name. |
|
|
|
|
replicate(self,
source,
target,
**options)
Replicate changes from the source database to the target database. |
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|