great_expectations.types
¶
Submodules¶
Package Contents¶
Classes¶
Analogously to the way “SerializableDictDot” extends “DictDot” to provide JSON serialization, the present class, |
|
Generic enumeration. |
|
str(object=’’) -> str |
|
str(object=’’) -> str |
|
str(object=’’) -> str |
|
|
Defines information sufficient to identify a class to be (dynamically) loaded for a DataContext. |
Generic enumeration. |
|
Generic enumeration. |
|
|
A convenience class for migrating away from untyped dictionaries to stronger typed objects. |
A convenience class for migrating away from untyped dictionaries to stronger typed objects. |
Functions¶
|
This method makes a copy of a dictionary, applying deep copy to attribute values, except for non-pickleable objects. |
-
class
great_expectations.types.
SerializableDotDict
¶ Bases:
great_expectations.types.base.DotDict
Analogously to the way “SerializableDictDot” extends “DictDot” to provide JSON serialization, the present class, “SerializableDotDict” extends “DotDict” to provide JSON-serializable version of the “DotDict” class as well. Since “DotDict” is already YAML-serializable, “SerializableDotDict” is both YAML-serializable and JSON-serializable.
-
abstract
to_json_dict
(self)¶
-
abstract
-
class
great_expectations.types.
ColorPalettes
¶ Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
-
CATEGORY_5
¶
-
CATEGORY_7
¶
-
DIVERGING_7
¶
-
HEATMAP_6
¶
-
ORDINAL_5
¶
-
-
class
great_expectations.types.
PrimaryColors
¶ Bases:
str
,enum.Enum
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
-
ORANGE
= #FF6310¶
-
COAL_GRAY
= #404041¶
-
-
class
great_expectations.types.
SecondaryColors
¶ Bases:
str
,enum.Enum
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
-
MIDNIGHT_BLUE
= #272763¶
-
ROYAL_BLUE
= #223F99¶
-
TURQUOISE_BLUE
= #4DC0B4¶
-
LEAF_GREEN
= #B6C647¶
-
GOLD_YELLOW
= #F3C62D¶
-
POMEGRANATE_PINK
= #E2226B¶
-
LAVENDER_PURPLE
= #BC87E6¶
-
-
class
great_expectations.types.
TintsAndShades
¶ Bases:
str
,enum.Enum
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
-
ORANGE_100
= #803208¶
-
ORANGE_90
= #A03e0A¶
-
ORANGE_80
= #C04B0C¶
-
ORANGE_70
= #df570e¶
-
ORANGE_60
= #ff6310¶
-
ORANGE_50
= #ff7f3b¶
-
ORANGE_40
= #ff9b67¶
-
ORANGE_30
= #ffb892¶
-
ORANGE_20
= #ffd4be¶
-
ORANGE_10
= #FFF0E9¶
-
YELLOW_100
= #534207¶
-
YELLOW_90
= #7b6311¶
-
YELLOW_80
= #a3841a¶
-
YELLOW_70
= #cba524¶
-
YELLOW_60
= #f3c62d¶
-
YELLOW_50
= #f5d053¶
-
YELLOW_40
= #f7da78¶
-
YELLOW_30
= #fae59e¶
-
YELLOW_20
= #fcefc3¶
-
YELLOW_10
= #fef9e9¶
-
PINK_100
= #70062e¶
-
PINK_90
= #960f42¶
-
PINK_80
= #bc1957¶
-
PINK_70
= #e2226b¶
-
PINK_60
= #e64281¶
-
PINK_50
= #ea6396¶
-
PINK_40
= #ef83ac¶
-
PINK_30
= #f3a3c1¶
-
PINK_20
= #f7c4d6¶
-
PINK_10
= #fbe4ec¶
-
GRAY_100
= #000000¶
-
GRAY_90
= #404041¶
-
GRAY_80
= #58595B¶
-
GRAY_70
= #6d6e70¶
-
GRAY_60
= #808184¶
-
GRAY_50
= #929497¶
-
GRAY_40
= #a6a8ab¶
-
GRAY_30
= #bbbdbf¶
-
GRAY_20
= #d0d2d3¶
-
GRAY_10
= #e6e7e8¶
-
MIDNIGHT_BLUE_100
= #141432¶
-
MIDNIGHT_BLUE_90
= #1e1e48¶
-
MIDNIGHT_BLUE_80
= #272763¶
-
MIDNIGHT_BLUE_70
= #424277¶
-
MIDNIGHT_BLUE_60
= #5d5d8a¶
-
MIDNIGHT_BLUE_50
= #78789e¶
-
MIDNIGHT_BLUE_40
= #9494b1¶
-
MIDNIGHT_BLUE_30
= #afafc5¶
-
MIDNIGHT_BLUE_20
= #cacad8¶
-
MIDNIGHT_BLUE_10
= #e5e5ec¶
-
ROYAL_BLUE_100
= #091a4c¶
-
ROYAL_BLUE_90
= #0f235f¶
-
ROYAL_BLUE_80
= #162072¶
-
ROYAL_BLUE_70
= #1c3686¶
-
ROYAL_BLUE_60
= #223f99¶
-
ROYAL_BLUE_50
= #4860ab¶
-
ROYAL_BLUE_40
= #6e81bc¶
-
ROYAL_BLUE_30
= #95a3ce¶
-
ROYAL_BLUE_20
= #bbc4df¶
-
ROYAL_BLUE_10
= #e1e5f1¶
-
TURQUOISE_BLUE_100
= #144944¶
-
TURQUOISE_BLUE_90
= #226760¶
-
TURQUOISE_BLUE_80
= #31847c¶
-
TURQUOISE_BLUE_70
= #3fa298¶
-
TURQUOISE_BLUE_60
= #4dc0b4¶
-
TURQUOISE_BLUE_50
= #6ccbc1¶
-
TURQUOISE_BLUE_40
= #8bd6ce¶
-
TURQUOISE_BLUE_30
= #aae1da¶
-
TURQUOISE_BLUE_20
= #c9ece7¶
-
TURQUOISE_BLUE_10
= #e8f7f4¶
-
GREEN_100
= #454c14¶
-
GREEN_90
= #616a21¶
-
GREEN_80
= #7e892e¶
-
GREEN_70
= #9aa83a¶
-
GREEN_60
= #b6c647¶
-
GREEN_50
= #c3d067¶
-
GREEN_40
= #cfda86¶
-
GREEN_30
= #dce3a6¶
-
GREEN_20
= #e8edc5¶
-
GREEN_10
= #f5f7e5¶
-
PURPLE_100
= #3b254d¶
-
PURPLE_90
= #5b3e73¶
-
PURPLE_80
= #7c569a¶
-
PURPLE_70
= #9c6fc0¶
-
PURPLE_60
= #bc87e6¶
-
PURPLE_50
= #c79aea¶
-
PURPLE_40
= #d2adee¶
-
PURPLE_30
= #dcc1f2¶
-
PURPLE_20
= #e7d4f6¶
-
PURPLE_10
= #f2e7fa¶
-
-
class
great_expectations.types.
ClassConfig
(class_name, module_name=None)¶ Defines information sufficient to identify a class to be (dynamically) loaded for a DataContext.
-
property
class_name
(self)¶
-
property
module_name
(self)¶
-
property
-
class
great_expectations.types.
FontFamily
¶ Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
-
MONTSERRAT
= Montserrat¶
-
ROBOTO_MONO
= Roboto Mono¶
-
SOURCE_SANS_PRO
= Source Sans Pro¶
-
-
class
great_expectations.types.
FontFamilyURL
¶ Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
-
MONTSERRAT
= https://fonts.googleapis.com/css2?family=Montserrat¶
-
ROBOTO_MONO
= https://fonts.googleapis.com/css2?family=Roboto+Mono¶
-
SOURCE_SANS_PRO
= https://fonts.googleapis.com/css2?family=Source+Sans+Pro¶
-
-
great_expectations.types.
logger
¶
-
great_expectations.types.
pyspark
¶
-
class
great_expectations.types.
DictDot
¶ A convenience class for migrating away from untyped dictionaries to stronger typed objects.
Can be instantiated with arguments:
- my_A = MyClassA(
foo=”a string”, bar=1,
)
Can be instantiated from a dictionary:
- my_A = MyClassA(
- **{
“foo”: “a string”, “bar”: 1,
}
)
Can be accessed using both dictionary and dot notation
my_A.foo == “a string” my_A.bar == 1
my_A[“foo”] == “a string” my_A[“bar”] == 1
Pairs nicely with @dataclass:
@dataclass() class MyClassA(DictDot):
foo: str bar: int
Can be made immutable:
@dataclass(frozen=True) class MyClassA(DictDot):
foo: str bar: int
For more examples of usage, please see test_dataclass_serializable_dot_dict_pattern.py in the tests folder.
-
include_field_names
:Set[str]¶
-
exclude_field_names
:Set[str]¶
-
__getitem__
(self, item)¶
-
__setitem__
(self, key, value)¶
-
__delitem__
(self, key)¶
-
__contains__
(self, key)¶
-
__len__
(self)¶
-
keys
(self)¶
-
values
(self)¶
-
items
(self)¶
-
get
(self, key, default_value=None)¶
-
to_raw_dict
(self)¶ Convert this object into a standard dictionary, recursively.
This is often convenient for serialization, and in cases where an untyped version of the object is required.
-
to_dict
(self)¶
-
property_names
(self, include_keys: Optional[Set[str]] = None, exclude_keys: Optional[Set[str]] = None)¶ Assuming that – by convention – names of private properties of an object are prefixed by “_” (a single underscore character), return these property names as public property names. To support this convention, the extending classes must implement property accessors, corresponding to the property names, return by this method.
- Parameters
include_keys – inclusion list (“include only these properties, while excluding all the rest”)
exclude_keys – exclusion list (“exclude only these properties, while include all the rest”)
- Returns
property names, subject to inclusion/exclusion filtering
-
class
great_expectations.types.
SerializableDictDot
¶ Bases:
great_expectations.types.DictDot
A convenience class for migrating away from untyped dictionaries to stronger typed objects.
Can be instantiated with arguments:
- my_A = MyClassA(
foo=”a string”, bar=1,
)
Can be instantiated from a dictionary:
- my_A = MyClassA(
- **{
“foo”: “a string”, “bar”: 1,
}
)
Can be accessed using both dictionary and dot notation
my_A.foo == “a string” my_A.bar == 1
my_A[“foo”] == “a string” my_A[“bar”] == 1
Pairs nicely with @dataclass:
@dataclass() class MyClassA(DictDot):
foo: str bar: int
Can be made immutable:
@dataclass(frozen=True) class MyClassA(DictDot):
foo: str bar: int
For more examples of usage, please see test_dataclass_serializable_dot_dict_pattern.py in the tests folder.
-
abstract
to_json_dict
(self)¶ # TODO: <Alex>2/4/2022</Alex> A reference implementation can be provided, once circular import dependencies, caused by relative locations of the “great_expectations/types/__init__.py” and “great_expectations/core/util.py” modules are resolved.
-
great_expectations.types.
safe_deep_copy
(data, memo=None)¶ This method makes a copy of a dictionary, applying deep copy to attribute values, except for non-pickleable objects.