proxystore.globus.app¶
Create GlobusApp
instances.
get_token_storage
¶
get_token_storage(
filepath: str | Path | None = None,
*,
namespace: str = "DEFAULT"
) -> SQLiteTokenStorage
Create token storage adapter.
Parameters:
-
filepath
(str | Path | None
, default:None
) –Name of the database file. If not provided, defaults to a file in the ProxyStore home directory (see
home_dir()
). -
namespace
(str
, default:'DEFAULT'
) –Optional namespace to use within the database for partitioning token data.
Returns:
-
SQLiteTokenStorage
–Token storage.
Source code in proxystore/globus/app.py
get_client_credentials_from_env
¶
Read the Globus Client ID and secret from the environment.
The Client ID should be set to PROXYSTORE_GLOBUS_CLIENT_ID
and
the secret to PROXYSTORE_GLOBUS_CLIENT_SECRET
.
Note
This function performs no validation on the values of the variables.
Returns:
Raises:
-
ValueError
–if one of the environment variables is set.
Source code in proxystore/globus/app.py
get_globus_app
¶
Get a Globus App based on the environment.
If a client ID and secret are set in the environment, returns a
ClientApp
using
get_client_app()
. Otherwise
returns a UserApp
using
get_user_app()
.
Returns:
-
GlobusApp
–Initialized app.
Source code in proxystore/globus/app.py
get_client_app
¶
Get a Client Globus App.
Parameters:
-
client_id
(str | None
, default:None
) –Client ID. If one or both of the
client_id
andclient_secret
are not provided, the values will be read from the environment usingget_client_credentials_from_env()
. -
client_secret
(str | None
, default:None
) –Client secret. See above.
Returns:
-
ClientApp
–Initialized app.
Source code in proxystore/globus/app.py
get_user_app
¶
Get a User Globus App.
The UserApp
will
automatically perform an interactive flow with the user as needed.
Returns:
-
UserApp
–Initialized app.
Source code in proxystore/globus/app.py
is_client_login
¶
is_client_login() -> bool
Check if Globus client identity environment variables are set.
Based on the Globus Compute SDK's
is_client_login()
.
Returns:
-
bool
–True
ifPROXYSTORE_GLOBUS_CLIENT_ID
andPROXYSTORE_GLOBUS_CLIENT_SECRET
are set.