InMemStorage#

class sunpy.data.data_manager.storage.InMemStorage[source]#

Bases: StorageProviderBase

This provides a storage stored in memory.

Methods Summary

delete_by_key(key, value)

Deletes the matching entry from the store.

find_by_key(key, value)

Returns the file details if value corresponding to the key found in storage.

store(details)

Stores the details in the storage.

Methods Documentation

delete_by_key(key, value)[source]#

Deletes the matching entry from the store.

Parameters:
  • key (str) – The key/column name of the field.

  • value (str) – The value associated with the key of the entry.

Raises:

KeyError – KeyError is raised if key does not exist.

find_by_key(key, value)[source]#

Returns the file details if value corresponding to the key found in storage. Returns None if hash not found.

Parameters:
  • key (str) – The key/column name of the field.

  • value (str) – The value associated with the key of the entry.

Returns:

dict or Nonedict contains the details of the file. None if hash not found.

Raises:

KeyError – KeyError is raised if key does not exist.

store(details)[source]#

Stores the details in the storage.

Parameters:

details (dict) – Details to be stored.