Database is an abstract class which defines some constants and setter/getter for subscripts. You have to extend from it by creating a new class and overriding __init__, get, list, find, save and delete to conform to the database protocol.
Delete object in database.
Finds an object by searching the whole database for key. It’s possible to supply a list of acceptable object types and to provide a limit of objects. This method returns a list of lglass.rpsl.Object.
Flush database cache.
Get specific object addressed by type and primary_key from database. Returns lglass.rpsl.Object. This method shall raise a KeyError if the object was not found.
Return list of matching RPSL object specs, filter can be a callable taking two arguments (type, primary_key), and limit can be a int. RPSL object specs are tuples consisting of two str instances.
Save object in database.
Return schema for type. Raises a KeyError if schema was not found.
This database backend operates completely in memory by using a Python dictionary to organize the information. It uses only builtin Python data types like list, tuple, and dict.
Create database from URL. This function accepts a str or an URL tuple. The URL schema may have multiple formats:
This decorator adds the supplied class to the url_schemes dict with the schema specified in name