FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
feast/sdk/python/feast/api/registry/rest/codegen_utils.py at v0.63.0 · feast-dev/feast · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
feast-dev
/
feast
Public
Notifications
You must be signed in to change notification settings
Fork
1.4k
Star
7.2k
Code
Issues
218
Pull requests
191
Discussions
Actions
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
feast
/
sdk
/
python
/
feast
/
api
/
registry
/
rest
/
codegen_utils.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (32 loc) · 1.41 KB
Breadcrumbs
feast
/
sdk
/
python
/
feast
/
api
/
registry
/
rest
/
codegen_utils.py
Copy path
File metadata and controls
51 lines (32 loc) · 1.41 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import
logging
from
pathlib
import
Path
from
jinja2
import
Environment
,
FileSystemLoader
def
render_template
(
template_name
,
context
):
template_dir
=
Path
(
__file__
).
parent
/
"templates"
env
=
Environment
(
loader
=
FileSystemLoader
(
str
(
template_dir
)),
trim_blocks
=
True
,
lstrip_blocks
=
True
)
template
=
env
.
get_template
(
template_name
)
try
:
return
template
.
render
(
**
context
)
except
Exception
as
e
:
logging
.
warning
(
f"Failed to render template
{
template_name
}
for
{
context
.
get
(
'name'
,
'unknown'
)
}
:
{
e
}
"
)
return
""
def
render_feature_view_code
(
context
):
return
render_template
(
"feature_view_template.jinja2"
,
context
)
def
render_entity_code
(
context
):
return
render_template
(
"entity_template.jinja2"
,
context
)
def
render_data_source_code
(
context
):
return
render_template
(
"data_source_template.jinja2"
,
context
)
def
render_feature_service_code
(
context
):
return
render_template
(
"feature_service_template.jinja2"
,
context
)
def
render_feature_code
(
context
):
return
render_template
(
"feature_template.jinja2"
,
context
)
def
render_saved_dataset_code
(
context
):
return
render_template
(
"saved_dataset_template.jinja2"
,
context
)
def
render_request_source_code
(
context
):
return
render_template
(
"request_source_template.jinja2"
,
context
)
def
render_push_source_code
(
context
):
return
render_template
(
"push_source_template.jinja2"
,
context
)
Back
|
FazBrowse Home
|
New Git URL