StorageProviderBase

class sunpy.data.data_manager.storage.StorageProviderBase[source]

Bases: object

Base class for remote data manager storage providers.

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 coresponding to the key found in storage.

store(details)

Stores the details in the storage.

Methods Documentation

abstract 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.

abstract find_by_key(key, value)[source]

Returns the file details if value coresponding 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.

abstract store(details)[source]

Stores the details in the storage.

Parameters

details (dict) – Details to be stored.