Store Module

class great_expectations.data_context.store.store.WriteOnlyStore(serialization_type=None, root_directory=None)

Bases: object

This base class supports writing, but not reading.

It’s suitable for things like HTML files that are information sinks.

set(key, value, serialization_type=None)
class great_expectations.data_context.store.store.ReadWriteStore(serialization_type=None, root_directory=None)

Bases: great_expectations.data_context.store.store.WriteOnlyStore

This base class supports both reading and writing.

Most of the core objects in DataContext are handled by subclasses of ReadWriteStore.

get(key, serialization_type=None)
list_keys()
has_key(key)
class great_expectations.data_context.store.store.BasicInMemoryStore(serialization_type=None, root_directory=None)

Bases: great_expectations.data_context.store.store.ReadWriteStore

Like a dict, but much harder to write.

This class uses an InMemoryStoreBackend, but I question whether it’s worth it. It would be easier just to wrap a dict.

This class is used for testing and not much else.

has_key(key)
list_keys()
class great_expectations.data_context.store.store_backend.StoreBackend(root_directory=None)

Bases: object

a key-value store, to abstract away reading and writing to a persistence layer

get(key)
set(key, value, **kwargs)
has_key(key)
list_keys()
class great_expectations.data_context.store.store_backend.InMemoryStoreBackend(separator='.', root_directory=None)

Bases: great_expectations.data_context.store.store_backend.StoreBackend

Uses an in-memory dictionary as a store backend.

Note: currently, this class turns the whole key into a single key_string. This works, but it’s blunt.

list_keys()
class great_expectations.data_context.store.store_backend.FixedLengthTupleStoreBackend(filepath_template, key_length, root_directory, forbidden_substrings=None, platform_specific_separator=True)

Bases: great_expectations.data_context.store.store_backend.StoreBackend

The key to this StoreBackend abstract class must be a tuple with fixed length equal to key_length. The filepath_template is a string template used to convert the key to a filepath. There’s a bit of regex magic in _convert_filepath_to_key that reverses this process, so that we can write AND read using filenames as keys.

Another class should get this logic through multiple inheritance.

verify_that_key_to_filepath_operation_is_reversible()
class great_expectations.data_context.store.store_backend.FixedLengthTupleFilesystemStoreBackend(base_directory, filepath_template, key_length, root_directory, forbidden_substrings=None, platform_specific_separator=True)

Bases: great_expectations.data_context.store.store_backend.FixedLengthTupleStoreBackend

Uses a local filepath as a store.

The key to this StoreBackend must be a tuple with fixed length equal to key_length. The filepath_template is a string template used to convert the key to a filepath. There’s a bit of regex magic in _convert_filepath_to_key that reverses this process, so that we can write AND read using filenames as keys.

list_keys()
has_key(key)
class great_expectations.data_context.store.store_backend.FixedLengthTupleS3StoreBackend(root_directory, filepath_template, key_length, bucket, prefix='', boto3_options=None, forbidden_substrings=None, platform_specific_separator=False)

Bases: great_expectations.data_context.store.store_backend.FixedLengthTupleStoreBackend

Uses an S3 bucket as a store.

The key to this StoreBackend must be a tuple with fixed length equal to key_length. The filepath_template is a string template used to convert the key to a filepath. There’s a bit of regex magic in _convert_filepath_to_key that reverses this process, so that we can write AND read using filenames as keys.

list_keys()
has_key(key)
class great_expectations.data_context.store.store_backend.FixedLengthTupleGCSStoreBackend(root_directory, filepath_template, key_length, bucket, prefix, project, forbidden_substrings=None, platform_specific_separator=False)

Bases: great_expectations.data_context.store.store_backend.FixedLengthTupleStoreBackend

Uses a GCS bucket as a store.

The key to this StoreBackend must be a tuple with fixed length equal to key_length. The filepath_template is a string template used to convert the key to a filepath. There’s a bit of regex magic in _convert_filepath_to_key that reverses this process, so that we can write AND read using filenames as keys.

list_keys()
has_key(key)
class great_expectations.data_context.store.namespaced_read_write_store.NamespacedReadWriteStore(store_backend, root_directory, serialization_type='json')

Bases: great_expectations.data_context.store.store.ReadWriteStore

list_keys()
has_key(key)
class great_expectations.data_context.store.namespaced_read_write_store.ExpectationsStore(store_backend, root_directory, serialization_type='json')

Bases: great_expectations.data_context.store.namespaced_read_write_store.NamespacedReadWriteStore

class great_expectations.data_context.store.namespaced_read_write_store.ValidationsStore(store_backend, root_directory, serialization_type='json')

Bases: great_expectations.data_context.store.namespaced_read_write_store.NamespacedReadWriteStore

class great_expectations.data_context.store.namespaced_read_write_store.HtmlSiteStore(root_directory, serialization_type=None, store_backend=None)

Bases: great_expectations.data_context.store.namespaced_read_write_store.NamespacedReadWriteStore

list_keys()
write_index_page(page)

This third store has a special method, which uses a zero-length tuple as a key.

class great_expectations.data_context.store.evaluation_parameter_store.InMemoryEvaluationParameterStore(root_directory=None)

Bases: object

You want to be a dict. You get to be a dict. But we call you a Store.

get(key)
set(key, value)
has_key(key)
list_keys()