KERIA DB API

keria.db.basing

KERIA keria.db.basing module

class keria.db.basing.AgencyBaser(headDirPath=None, perm=None, reopen=False, **kwa)[source]

Agency database for tracking Agent tenants in this KERIA instance.

reopen(**kwa)[source]

Open sub databases

class keria.db.basing.ExnSeeker(db, headDirPath=None, perm=None, reopen=False, **kwa)[source]

Seeker indexes all credentials in the KERIpy saved Creder database.

Static indexes are created for issued by/schema and issued to/schema and dynamic indexes are created for all top level scalar valued fields in the credential payload (‘a’ field). The Seeker uses the schema of each credential to determine the payload fields to index by.

reopen(**kwa)[source]

Open if closed or close and reopen if opened or create and open if not if not preexistent, directory path for lmdb at .path and then Open lmdb and assign to .env

Parameters:
  • temp (bool) – assign to .temp True means open in temporary directory, clear on close False means open persistent directory, do not clear on close

  • headDirPath (str) – optional head directory pathname for main database Default .HeadDirpath

  • perm (int) – optional numeric os dir permissions for database directory and database files. Default .Perm

  • clear (bool) – True means remove directory upon close False means do not remove directory upon close

  • reuse (bool) – True means reuse self.path if already exists False means do not reuse but remake self.path

  • clean (bool) – True means path uses clean tail variant False means path uses normal tail variant

  • mode (str) – file open mode when .filed

  • fext (str) – File extension when .filed

  • readonly (bool) – True means open database in readonly mode False means open database in read/write mode

class keria.db.basing.IndexRecord(subkey: str, paths: list)[source]

Registry Key keyed by Registry name

class keria.db.basing.Seeker(db, reger, headDirPath=None, perm=None, reopen=False, **kwa)[source]

Seeker indexes all credentials in the KERIpy saved Creder database.

Static indexes are created for issued by/schema and issued to/schema and dynamic indexes are created for all top level scalar valued fields in the credential payload (‘a’ field). The Seeker uses the schema of each credential to determine the payload fields to index by.

generateIndexes(said)[source]

Parse schema of said, create schIdx entry keyed to said of schema and the subkey indexes in self.indexes

reopen(**kwa)[source]

Open if closed or close and reopen if opened or create and open if not if not preexistent, directory path for lmdb at .path and then Open lmdb and assign to .env

Parameters:
  • temp (bool) – assign to .temp True means open in temporary directory, clear on close False means open persistent directory, do not clear on close

  • headDirPath (str) – optional head directory pathname for main database Default .HeadDirpath

  • perm (int) – optional numeric os dir permissions for database directory and database files. Default .Perm

  • clear (bool) – True means remove directory upon close False means do not remove directory upon close

  • reuse (bool) – True means reuse self.path if already exists False means do not reuse but remake self.path

  • clean (bool) – True means path uses clean tail variant False means path uses normal tail variant

  • mode (str) – file open mode when .filed

  • fext (str) – File extension when .filed

  • readonly (bool) – True means open database in readonly mode False means open database in read/write mode

keria.db.basing.operators(filtr)[source]

Executable operator factory method

An factory for processing a filter dict and generating an array of executable operators to apply to a given credential search