Tools for managing Globus transfers supporting the NSF NCAR Geoscience Data Exchange (GDEX) project.
Project description
dsglobus
This application is a command-line tool for Globus data transfer and management of files archived in the NSF NCAR Research Data Archive.
Installation
Use the package manager pip to
install rda_python_globus.
From within your Python virtual environment:
pip install rda-python-globus
After installation, the cli command dsglobus will be available in
the /bin directory of your virtual environment.
Command-line usage
The dsglobus app is run with the following subcommands. Each supports a
--help/-h option for details and examples on its usage:
dsglobus transfer --help
dsglobus get-task --help
dsglobus task-list --help
dsglobus cancel-task --help
dsglobus ls --help
dsglobus mkdir --help
dsglobus rename --help
dsglobus delete --help
Example usage
- Transfer a single file from the
NCAR RDA GLADEendpoint to theNCAR RDA Quasarendpoint:
$ dsglobus transfer \
--source-endpoint rda-glade \
--destination-endpoint rda-quasar \
--source-file /data/d999009/file.txt \
--destination-file /d999009/file.txt
- Multiple files can be transferred with a single
dsglobus transfercall by passing a JSON formatted list of files. To transfer a batch of files from a JSON file:
$ dsglobus transfer \
--source-endpoint SOURCE_ENDPOINT \
--destination-endpoint DESTINATION_ENDPOINT \
--batch /path/to/batch.json
where the contents of batch.json is formatted with source_file/destination_file
pairs as:
{
"files": [
{"source_file": "/data/d999009/file1.tar", "destination_file": "/d999009/file1.tar"},
{"source_file": "/data/d999009/file2.tar", "destination_file": "/d999009/file2.tar"},
{"source_file": "/data/d999009/file3.tar", "destination_file": "/d999009/file3.tar"}
]
}
Listing contents of a directory on a Globus endpoint
A listing of files on a Globus endpoint can be retrieved via the dsglobus ls command. This
command supports filtering the results subject to the following rules:
- Filter patterns must start with
--, ~, !, or!~. If none of these are given,=will be used =does exact matching~does regex matching, supporting globs (*)!does inverse=matching!~does inverse~matching~*.txtmatches all.txtfiles, for example
Examples:
$ dsglobus ls -ep <endpoint> -p <path> --filter '~*.txt' # all txt files
$ dsglobus ls -ep <endpoint> -p <path> --filter '!~file1.*' # not starting in "file1."
$ dsglobus ls -ep <endpoint> -p <path> --filter '~*ile3.tx*' # anything with "ile3.tx"
$ dsglobus ls -ep <endpoint> -p <path> --filter '=file2.txt' # only "file2.txt"
$ dsglobus ls -ep <endpoint> -p <path> --filter 'file2.txt' # same as '=file2.txt'
$ dsglobus ls -ep <endpoint> -p <path> --filter '!=file2.txt' # anything but "file2.txt"
Customizing and extending dsglobus
This app can be modified and adapted to be used on other Globus clients and endpoints with
minimal effort. Simply update the client ID, token storage, endpoint IDs, endpoint aliases, and
other configuration parameters in rda_globus_python/lib/config.py to adapt the app to your use
case and specific needs.
Resources
This app is adapted from the fully featured Globus Command Line Interface (CLI)
and uses the
TransferClient class from the Globus SDK.
The full Globus Transfer documentation offers full details about the service and reference documentation for all of its supported methods and features.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rda_python_globus-1.0.11.tar.gz.
File metadata
- Download URL: rda_python_globus-1.0.11.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61ac2c17d0bf5ec7e93c31e465dfc802325db507d05a89e2ce740a84ff390426
|
|
| MD5 |
8d53caefcc6b5a3df535e19787ab16c8
|
|
| BLAKE2b-256 |
8a8a3d03bf1fbfac5b0e2084c764c252bb037dc42e89f1a61f3eb6c96c06480b
|
Provenance
The following attestation bundles were made for rda_python_globus-1.0.11.tar.gz:
Publisher:
publish.yml on NCAR/rda-python-globus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rda_python_globus-1.0.11.tar.gz -
Subject digest:
61ac2c17d0bf5ec7e93c31e465dfc802325db507d05a89e2ce740a84ff390426 - Sigstore transparency entry: 941372911
- Sigstore integration time:
-
Permalink:
NCAR/rda-python-globus@f003f0f36f2a783fc273668ebaa885ef20a82d01 -
Branch / Tag:
refs/tags/v1.0.11 - Owner: https://github.com/NCAR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f003f0f36f2a783fc273668ebaa885ef20a82d01 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rda_python_globus-1.0.11-py3-none-any.whl.
File metadata
- Download URL: rda_python_globus-1.0.11-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b622fc318e248b7dc1bba11aa0e211aee9133e637e4d0e236539b64ca7427be
|
|
| MD5 |
cd3442ca51ce18b170b8f43a024dfdef
|
|
| BLAKE2b-256 |
a203800522d8a85b7eb665942c15033d7e89aa1e092ea3c14099ba0c77dfd182
|
Provenance
The following attestation bundles were made for rda_python_globus-1.0.11-py3-none-any.whl:
Publisher:
publish.yml on NCAR/rda-python-globus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rda_python_globus-1.0.11-py3-none-any.whl -
Subject digest:
2b622fc318e248b7dc1bba11aa0e211aee9133e637e4d0e236539b64ca7427be - Sigstore transparency entry: 941372926
- Sigstore integration time:
-
Permalink:
NCAR/rda-python-globus@f003f0f36f2a783fc273668ebaa885ef20a82d01 -
Branch / Tag:
refs/tags/v1.0.11 - Owner: https://github.com/NCAR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f003f0f36f2a783fc273668ebaa885ef20a82d01 -
Trigger Event:
release
-
Statement type: