Class: BaseStore

Methods

open (name, mode='rws', dbclass=Pyrite.Database, **)

Open an existing database. The mode is a string which can include the characters r for reading, w for writing, s for access to records marked "secret", and/or x for exclusive access.

Important: Not all stores support all combinations of modes.

The dbclass parameter specifies a subclass of Pyrite.Database (or a class exhibiting the same interface) to use for this database.

create (name, creator, type, flags=0, version=1, dbclass=Pyrite.Database, **)

Create a new database, with the specified header information. The resulting database is opened and returned as an object of class dbclass.

delete (name, **)

Delete a database.

info (name, **)

Return a database's header, as a dictionary.

list (**)

Return a list of the names of all databases in the store.

listinfo (name=None, creator=None, type=None, **)

Return a list of the headers of databases in the store. By default, all available databases are listed; however, if one or more of name, creator, or type are supplied, only databases matching the supplied values are listed.

Tip: The name parameter might seem kind of useless given the existence of the info method, but it can actually be quite useful as part of a one-step test to see if a particular database both exists and matches a particular application.

copy (store, name)

Copy the named database from this store to another one..

install (store, name)

Copy the named database from another store to this one.

Important: The reason for the existence of both copy and install is because certain stores (DLP, for example) require different behavior depending on whether they are the source or target of a database copy. Whenever possible, your code should use install instead of copy when working with stores of unknown type.