File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,17 @@ A TransformPython must be written as a Python class that inherits from `Infrahub
75
75
76
76
Please refer to the guide [ Creating a Python transform] ( ../guides/python-transform ) for more information.
77
77
78
+ ##### Python transform accessing local files
79
+
80
+ There may be times that you want to access files that are stored within the Git repository such as Jinja2 templates.
81
+
82
+ This can be accomplished by using the ` self.root_directory ` that points to the root of the Git repository.
83
+
84
+ ``` python
85
+ async def transform (self , data ):
86
+ templates_path = f " { self .root_directory} /templates "
87
+ ```
88
+
78
89
#### Render a TransformPython
79
90
80
91
A TransformPython can be rendered with 2 different methods:
You can’t perform that action at this time.
0 commit comments