Skip to content

Commit

Permalink
Create aliases for client and decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
aversey committed Jul 16, 2024
1 parent 4e15eff commit b478cdd
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 0 deletions.
32 changes: 32 additions & 0 deletions python/hopsworks/client/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.client import (
get_instance,
get_python_version,
init,
set_python_version,
stop,
)


__all__ = [
get_instance,
get_python_version,
init,
set_python_version,
stop,
]
26 changes: 26 additions & 0 deletions python/hopsworks/client/auth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.client.auth import (
ApiKeyAuth,
BearerAuth,
)


__all__ = [
ApiKeyAuth,
BearerAuth,
]
24 changes: 24 additions & 0 deletions python/hopsworks/client/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.client.base import (
Client,
)


__all__ = [
Client,
]
44 changes: 44 additions & 0 deletions python/hopsworks/client/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.client.exceptions import (
DatasetException,
EnvironmentException,
ExternalClientError,
GitException,
JobException,
JobExecutionException,
KafkaException,
OpenSearchException,
ProjectException,
RestAPIError,
UnknownSecretStorageError,
)


__all__ = [
DatasetException,
EnvironmentException,
ExternalClientError,
GitException,
JobException,
JobExecutionException,
KafkaException,
OpenSearchException,
ProjectException,
RestAPIError,
UnknownSecretStorageError,
]
24 changes: 24 additions & 0 deletions python/hopsworks/client/external.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.client.external import (
Client,
)


__all__ = [
Client,
]
24 changes: 24 additions & 0 deletions python/hopsworks/client/hopsworks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.client.hopsworks import (
Client,
)


__all__ = [
Client,
]
30 changes: 30 additions & 0 deletions python/hopsworks/decorators.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.decorators import (
HopsworksConnectionError,
NoHopsworksConnectionError,
connected,
not_connected,
)


__all__ = [
HopsworksConnectionError,
NoHopsworksConnectionError,
connected,
not_connected,
]
15 changes: 15 additions & 0 deletions python/hopsworks_common/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright 2024 Hopsworks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

0 comments on commit b478cdd

Please sign in to comment.