diff --git a/auto_doc.py b/auto_doc.py index 9b2a6ad00..1fd5b40f8 100644 --- a/auto_doc.py +++ b/auto_doc.py @@ -27,6 +27,9 @@ "mr_api": ["hopsworks.project.Project.get_model_registry"], "ms_api": ["hopsworks.project.Project.get_model_serving"], }, + "api/udf.md": { + "udf": ["hopsworks.udf"], + }, "api/connection.md": { "connection_create": ["hopsworks.connection.Connection.connection"], "connection_properties": keras_autodoc.get_properties( diff --git a/docs/templates/api/udf.md b/docs/templates/api/udf.md new file mode 100644 index 000000000..47106cb1f --- /dev/null +++ b/docs/templates/api/udf.md @@ -0,0 +1,3 @@ +# UDF API + +{{udf}} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index e825f7a3b..ace10ae11 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -21,6 +21,7 @@ nav: - Login: generated/api/login.md - Connection: generated/api/connection.md - Projects: generated/api/projects.md + - UDF: generated/api/udf.md - Jobs: generated/api/jobs.md - Executions: generated/api/executions.md - FlinkCluster: generated/api/flink_cluster.md diff --git a/python/hopsworks/__init__.py b/python/hopsworks/__init__.py index 286bfe329..8705e2732 100644 --- a/python/hopsworks/__init__.py +++ b/python/hopsworks/__init__.py @@ -47,6 +47,8 @@ _secrets_api = None _project_api = None +udf = hsfs.hopsworks_udf.udf + def hw_formatwarning(message, category, filename, lineno, line=None): return "{}: {}\n".format(category.__name__, message) @@ -54,7 +56,7 @@ def hw_formatwarning(message, category, filename, lineno, line=None): warnings.formatwarning = hw_formatwarning -__all__ = ["connection"] +__all__ = ["connection", "udf"] logging.basicConfig( level=logging.INFO,