class documentation
class KedroContext: (source)
KedroContext is the base class which holds the configuration and Kedro's main functionality.
Method | __init__ |
Create a context object by providing the root of a Kedro project and the environment configuration subfolders (see kedro.config.ConfigLoader) |
Property | catalog |
Read-only property referring to Kedro's DataCatalog for this context. |
Property | config |
Read-only property referring to Kedro's ConfigLoader for this context. |
Property | env |
Property for the current Kedro environment. |
Property | params |
Read-only property referring to Kedro's parameters for this context. |
Property | project |
Read-only property containing Kedro's root project directory. |
Method | _get |
A hook for changing the creation of a DataCatalog instance. |
Method | _get |
Getter for credentials specified in credentials directory. |
Method | _get |
Get parameters and return the feed dictionary. |
Instance Variable | _config |
Undocumented |
Instance Variable | _env |
Undocumented |
Instance Variable | _extra |
Undocumented |
Instance Variable | _hook |
Undocumented |
Instance Variable | _package |
Undocumented |
Instance Variable | _project |
Undocumented |
def __init__(self, package_name:
str
, project_path: Union[ Path, str]
, config_loader: ConfigLoader
, hook_manager: PluginManager
, env: str
= None, extra_params: Dict[ str, Any]
= None):
(source)
¶
Create a context object by providing the root of a Kedro project and the environment configuration subfolders (see kedro.config.ConfigLoader)
Parameters | |
packagestr | Package name for the Kedro project the context is created for. |
projectUnion[ | Project path to define the context for. |
configConfigLoader | Undocumented |
hookPluginManager | The PluginManager to activate hooks, supplied by the session. |
env:str | Optional argument for configuration default environment to be used for running the pipeline. If not specified, it defaults to "local". |
extraDict[ | Optional dictionary containing extra project parameters. If specified, will update (and therefore take precedence over) the parameters retrieved from the project configuration. |
Raises | |
KedroContextError | If there is a mismatch between Kedro project version and package version. |
Read-only property referring to Kedro's DataCatalog for this context.
Returns | |
DataCatalog defined in catalog.yml . | |
Raises | |
KedroContextError | Incorrect DataCatalog registered for the project. |
Read-only property referring to Kedro's ConfigLoader for this context.
Returns | |
Instance of ConfigLoader . | |
Raises | |
KedroContextError | Incorrect ConfigLoader registered for the project. |
Read-only property referring to Kedro's parameters for this context.
Returns | |
|
def _get_catalog(self, save_version:
str
= None, load_versions: Dict[ str, str]
= None) -> DataCatalog
:
(source)
¶
A hook for changing the creation of a DataCatalog instance.
Returns | |
DataCatalog | DataCatalog defined in catalog.yml . |
Raises | |
KedroContextError | Incorrect DataCatalog registered for the project. |