-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclients.py
More file actions
59 lines (41 loc) · 1.73 KB
/
clients.py
File metadata and controls
59 lines (41 loc) · 1.73 KB
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
52
53
54
55
56
57
58
59
# This file is a part of globus-registered-api.
# https://github.com/globus/globus-registered-api
# Copyright 2025-2026 Globus <support@globus.org>
# SPDX-License-Identifier: Apache-2.0
from globus_sdk import AuthClient
from globus_sdk import GlobusApp
from globus_sdk import GroupsClient
from globus_sdk import SearchClient
from globus_registered_api import ExtendedFlowsClient
def create_auth_client(app: GlobusApp) -> AuthClient:
"""
Create an AuthClient for the given app.
This function mostly exists for unified testing fixtures.
:param app: A Globus app instance to use for authentication
:return: An AuthClient configured with the provided app
"""
return AuthClient(app=app)
def create_flows_client(app: GlobusApp) -> ExtendedFlowsClient:
"""
Create an ExtendedFlowsClient for the given app.
This function mostly exists for unified testing fixtures.
:param app: A Globus app instance to use for authentication
:return: An ExtendedFlowsClient configured with the provided app
"""
return ExtendedFlowsClient(app=app)
def create_groups_client(app: GlobusApp) -> GroupsClient:
"""
Create a GroupsClient for the given app.
This function mostly exists for unified testing fixtures.
:param app: A Globus app instance to use for authentication
:return: A GroupsClient configured with the provided app
"""
return GroupsClient(app=app)
def create_search_client(app: GlobusApp) -> SearchClient:
"""
Create a SearchClient for the given app.
This function mostly exists for unified testing fixtures.
:param app: A Globus app instance to use for authentication
:return: A SearchClient configured with the provided app
"""
return SearchClient(app=app)