b.c.Store(object) : class documentation

Part of bzrlib.config View In Hierarchy

Known subclasses: bzrlib.config.IniFileStore

Abstract interface to persistent storage for configuration options.
Method is_loaded Returns True if the Store has been loaded.
Method load Loads the Store from persistent storage.
Method unload Unloads the Store.
Method save Saves the Store to persistent storage.
Method external_url Undocumented
Method get_sections Returns an ordered iterable of existing sections.
Method get_mutable_section Returns the specified mutable section.
Method __repr__ Undocumented
Method _load_from_string Create a store from a string in configobj syntax.
def is_loaded(self):
Returns True if the Store has been loaded.

This is used to implement lazy loading and ensure the persistent storage is queried only when needed.

def load(self):
Loads the Store from persistent storage.
def _load_from_string(self, bytes):
Create a store from a string in configobj syntax.
ParametersbytesA string representing the file content.
def unload(self):
Unloads the Store.

This should make is_loaded() return False. This is used when the caller knows that the persistent storage has changed or may have change since the last load.

def save(self):
Saves the Store to persistent storage.
def external_url(self):
Undocumented
def get_sections(self):
Returns an ordered iterable of existing sections.
ReturnsAn iterable of (name, dict).
def get_mutable_section(self, section_name=None):
Returns the specified mutable section.
Parameterssection_nameThe section identifier
def __repr__(self):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2019-11-13 00:26:04.