hpcflow.sdk.persistence.store_resource.JSONFileStoreResource#

class hpcflow.sdk.persistence.store_resource.JSONFileStoreResource(app, name, filename, path, fs)#

Bases: StoreResource

For caching reads and writes to a JSON file.

Parameters:
  • app (App) – The main application context.

  • name (str) – The store name.

  • filename (str) – The name of the JSON file.

  • path (str | Path) – The path to the directory containing the JSON file.

  • fs – The filesystem that the JSON file resides within.

Methods

close

Close the store for a particular action.

open

Open the store.

Attributes

logger

The logger.

close(action)#

Close the store for a particular action.

Parameters:

action (str) – What we are closing the store for. Should match a previous call to close().

property logger#

The logger.

open(action)#

Open the store.

Parameters:

action (str) – What we are opening the store for; typically either read or update.