A Python client to simplify interactions with NASA's Unity Platform.
This repository has been archived. Please see https://github.com/unity-sds/unity-monorepo/tree/main/libs/unity-py for active development. .
Unity-Py provides a seamless way to interact with NASA's Unity Platform using Python. Built to simplify the connection and data retrieval process, this client offers a programmatic interface to Unity's services.
pip install unity-sds-client
python -m pip install git+https://github.com/unity-sds/unity-py.git
git clone https://github.com/unity-sds/unity-py.git
cd unity-py
poetry install
Authorization can be handled interactively, in which case you will be prompted for a username/password when calling the Unity() method, or can be handled by way of environment variables:
export UNITY_USER=MY_UNITY_USERNAME
export UNITY_PASSWORD=MY_UNITY_PASSWORD
Order of Authentication Parameters:
from unity_sds_client.unity import Unity
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.unity_services import UnityServices as services
s = Unity()
# set the venue for interacting with venue specific services
# if your venue id is a single string, use the following
s.set_venue_id("unity-sips-test")
# otherwise set the project and venue:
# s.set_project("sbg")
# s.set_venue("dev")
dataManager = s.client(services.DATA_SERVICE)
collections = dataManager.get_collections()
print(collections)
cd = dataManager.get_collection_data(collections[0])
for dataset in cd:
print(f'dataset name: {dataset.id}' )
for f in dataset.datafiles:
print(" " + f.location)
Run all tests and include printouts:
poetry run pytest -s
Run non-regression tests:
poetry run pytest -m "not regression"
Run regression tests (and include logs)
(Not Available Yet)
See our CHANGELOG.md for a history of our changes.
See our releases page for our key versioned releases.
No questions yet. Propose a question to be added here by reaching out to our contributors! See support section below.
Interested in contributing to our project? Please see our: CONTRIBUTING.md
See our: LICENSE
Please reach out to @anilnatha, @mike-gangl