Chaitya
08/07/2023, 11:11 PM.dict()
function, but i'd like to use the fields directly if possibleben
08/09/2023, 7:36 PMfrom dagster import ConfigurableResource, Definitions, asset
class MyResource(ConfigurableResource):
foo: str
@asset
def my_asset(my_resource: MyResource):
assert my_resource.foo == "bar"
defs = Definitions(
assets=[my_asset],
resources={
"my_resource": MyResource(foo="bar")
}
)
Chaitya
08/10/2023, 3:40 PMConfigurableResource[Any]
. That was preventing the type checker from knowing that the fields existed.Chaitya
08/10/2023, 3:40 PM