Unity-Py is a Python client to simplify interactions with NASA's Unity Platform.
Project description
Unity-Py
A Python client to simplify interactions with NASA's Unity Platform.
[INSERT SCREENSHOT OF YOUR SOFTWARE, IF APPLICABLE]
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.
Features
- Pythonic interface to NASA's Unity Platform
- Support for interactive and environment variable-based authorization
Contents
Quick Start
Requirements
- Python
- pip
Development Requirements
Setup Instructions
- Install via pypi:
pip install unity-sds-client
- Install from Github:
python -m pip install git+https://github.com/unity-sds/unity-py.git
- Building and installing locally using poetry:
git clone https://github.com/unity-sds/unity-py.git cd unity-py poetry install
Run Instructions
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:
- Environment variables
- Prompt for username and password
Usage Examples
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)
Test Instructions
-
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)
Documentation Generation
poetry install --with docs
poetry run sphinx-apidoc -f -o docs/source/ unity_sds_client
poetry run sphinx-build -M markdown docs/source docs/build
poetry run sphinx-build -M html docs/source docs/build/
Changelog
See our CHANGELOG.md for a history of our changes.
See our releases page for our key versioned releases.
Frequently Asked Questions (FAQ)
No questions yet. Propose a question to be added here by reaching out to our contributors! See support section below.
Contributing
Interested in contributing to our project? Please see our: CONTRIBUTING.md
License
See our: LICENSE
Support
Please reach out to @anilnatha, @mike-gangl
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
File details
Details for the file unity_sds_client-0.7.0.tar.gz
.
File metadata
- Download URL: unity_sds_client-0.7.0.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaf6726ca4438b022a6d62b6138c3e12522523ef074ee0dcb028d11713f4ff37 |
|
MD5 | 0a948e2ee8dd7f86eb94232219a08a4e |
|
BLAKE2b-256 | 023abbb22adf9338fb2cf85129585b9b4440cc8de54d7d4223f90e72dbd33fbb |
File details
Details for the file unity_sds_client-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: unity_sds_client-0.7.0-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69d71ee65e6aee2b72e9536e121490b1d0a7bf35c2c6ed4f4565628ab0fe1f21 |
|
MD5 | 2e2849a1805c6ecc8b513f99e43b80bb |
|
BLAKE2b-256 | 3f5fe9b273668238d61602bce79cd988a06ea95be0921156390d099440c6e403 |