Metadata-Version: 2.4
Name: rhino_health
Version: 2.1.20
Summary: Standard Development Kit for interacting with the Rhino Federated Computing Platform
Project-URL: Homepage, https://www.rhinofcp.com/
Project-URL: Documentation, https://rhinohealth.github.io/rhino_sdk_docs/html/index.html
Author-email: Rhino Federated Computing <rhino-sdk@rhinohealth.com>
Maintainer-email: Rhino Federated Computing <rhino-sdk@rhinohealth.com>
License: ## RHINO FEDERATED COMPUTING PYTHON SDK LICENSE AGREEMENT
        
        This license agreement (this **“Agreement”**) is a binding agreement.  By using the Rhino Federated Computing Python SDK (the **“Software”**) that is the subject of this Agreement you acknowledge that you have read this Agreement, that you understand it, and that you agree to be bound by its terms. If you do not agree with the terms and conditions of this Agreement, do not accept this Agreement and do not install or use the Software. Use of the software except pursuant to and in compliance with the terms of this Agreement constitutes copyright infringement.
        
        ### 1. License.
        Rhino Federated Computing, Inc (**“Licensor”**) is the owner of the Rhino Federated Computing Python SDK (the **“Software”**). Subject to the terms and conditions of this Agreement, Licensor hereby grants you a non-exclusive, non-transferable, non-sublicensable, license to use the Software, as necessary for you to access the services of Licensor in accordance with applicable documentation. Licensor may provide updates, upgrades and new releases available for download and installation by you (**“Upgrades”**), and all such Upgrades will be subject to the provisions of this Agreement.
        
        ### 2. Restrictions.
        Except as expressly permitted hereunder you may not, nor may you assist other parties to (a) copy, modify, or create derivative works of the Software or parts thereof, (b) distribute, sell or transfer the Software or parts thereof or sublicense your right to use the Software, (c) attempt to disable or circumvent any security or access control mechanism of Licensor’s services, (e) remove any trademarks or notices (including copyright notices) from the Software or (f) use the Software to provide services to third parties.
        
        ### 3. Intellectual Property.
        You have no ownership rights in the Software. Rather, you have a license to use the Software solely to access the Licensor services only so long as this Agreement remains in effect. Ownership of the Software and all intellectual property rights therein shall remain at all times with Licensor or its licensors. No rights are granted hereunder by estoppel or by implication.  All rights not granted to you herein are reserved to Licensor or its licensors. You have no obligation to provide Licensor with any feedback concerning the Software. Nevertheless, if you provide Licensor with any feedback concerning the Software, you also provide Licensor with a non-exclusive, perpetual license to make all uses of such feedback without any obligation to you.
        
        ### 4. Licensor Warranties; Disclaimer.
        The Software is provided “AS-IS”. The Licensor (and its licensors and commercial partners) expressly disclaims any warranties with respect to the Software. Licensor disclaims any statutory or implied warranties, including any warranties of merchantability, fitness for a particular purpose, title or non-infringement. No warranty is made that the Software will meet your requirements, that the operation of the Software will be continuous or error-free, that the Software will operate as intended or at all under all conditions, or that any defects in the Software will be corrected.
        
        ### 5. Limitation of Liability.
        In no event shall Licensor (or its licensors or commercial partners) be liable to you or any other entity for indirect, special, incidental or consequential damages (including, but not limited to, loss of profits, loss of data or loss of use damages) as a result of the Software or the use thereof, even if Licensor has been advised of the possibility of such damages or losses. The liability of Licensor (and its licensors or commercial partners) for the Software shall not exceed amounts actually paid by you to Licensor specifically for the use of the Software.
        
        ### 6. Termination.
        This Agreement shall come into effect as of the day that you accept its terms (including by making any use of the Software) and shall continue in effect until terminated according to the provisions hereof. Either party may terminate this agreement upon the occurrence of a material breach or default as to any obligation hereunder by the other party and the failure of such breaching party to remedy such breach within thirty (30) days after receiving written notice thereof from the non-breaching party, any such termination becoming immediately effective upon the giving of written notice of termination. Upon the expiry or termination of this Agreement, you shall cease all use of the Software.  The rights and obligations of the parties as set forth in Sections 2 – 9 shall survive the termination or expiration of this Agreement for any reason.
        
        ### 7. General.
        Any waivers of any condition of this Agreement must be in writing, and the waiver of any requirement in certain situations or circumstances shall not be interpreted as the waiver of such requirement in other situations or circumstances. This Agreement constitutes the entire agreement between the parties hereto. Any amendment or modification of this Agreement shall only be effective if it is in writing and signed by both parties hereto. If any part of this Agreement is found invalid or unenforceable by a court of competent jurisdiction, such provision shall be interpreted as necessary to give maximum effect to its provisions as possible under applicable law and the remainder of this Agreement shall remain in effect. Licensor may assign or transfer any of its rights or obligations hereunder without your consent. You may not assign any of your obligations or rights hereunder. Licensor communicates with its users electronically and on-line and, as such, you consent to receive all communications and notices electronically from Licensor or to an email address that you have provided to Licensor. All such communications or notifications shall be considered as having been provided in writing. You represent and warrant that: (i) you are not located in a country that is subject to a U.S. Government embargo, or that has been designated by the U.S. Government as a “terrorist supporting” country; and (ii) you are not listed on any U.S. Government list of prohibited or restricted parties.
        
        ### 8. Governing Law and Dispute Resolution.
        This Agreement (including this Section 12) will be governed by and construed in accordance with the laws of the State of New York. You and Licensor agree that, except as provided below, all disputes, controversies and claims related to this Agreement or the use of the Software (each a “Claim”), shall be finally and exclusively resolved by binding arbitration, which may be initiated by either party by sending a written notice requesting arbitration to the other party. Any election to arbitrate by one party shall be final and binding on the other. The arbitration will be conducted under the Streamlined Arbitration Rules and Procedures of JAMS that are in effect at the time the arbitration is initiated (the “JAMS Rules”) and under the terms set forth in these Terms. The arbitration will be conducted in New York unless the parties agree to video, phone and/or internet connection appearances. In the event of a conflict between the terms set forth herein and the JAMS Rules, the terms herein will control and prevail. Except as otherwise set forth herein, each party may seek any remedies available to you under federal, state or local laws in an arbitration action. The arbitrator will provide a written statement of the arbitrator’s decision regarding the Claim, the award given and the arbitrator’s findings and conclusions on which the arbitrator’s decision is based. The determination of whether a Claim is subject to arbitration shall be governed by the Federal Arbitration Act and determined by a court rather than an arbitrator. Except as otherwise provided in these Terms, (a) you and Licensor may litigate in court to compel arbitration, stay proceedings pending arbitration, or confirm, modify, vacate or enter judgment on the award entered by the arbitrator; and (b) the arbitrator’s decision shall be final, binding on all parties and enforceable in any court that has jurisdiction, provided that any award may be challenged if the arbitrator fails to follow applicable law. You and Licensor agree that any arbitration shall be limited to the Claim between Licensor and you individually. YOU AND LICENSOR LEGALLY AGREE THAT (a) THERE IS NO RIGHT OR AUTHORITY FOR ANY DISPUTE TO BE ARBITRATED ON A CLASS-ACTION BASIS OR TO UTILIZE CLASS ACTION PROCEDURES; (b) THERE IS NO RIGHT OR AUTHORITY FOR ANY DISPUTE TO BE BROUGHT IN A PURPORTED REPRESENTATIVE CAPACITY OR AS A PRIVATE ATTORNEY GENERAL; AND (c) NO ARBITRATION SHALL BE JOINED WITH ANY OTHER ARBITRATION. You and Licensor agree that the following Claims are not subject to the above provisions concerning negotiations and binding arbitration: (a) any Claim seeking to enforce or protect, or concerning the validity of, any of your or Licensor’s intellectual property rights; (b) any Claim related to, or arising from, allegations of theft, piracy, invasion of privacy or unauthorized use; and (c) any claim for equitable relief.
        
        ### 9. US Government Restricted Rights.
        The Software is provided with "RESTRICTED RIGHTS." Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in applicable laws and regulations. Use of the Software and related materials by the U.S. Government constitutes acknowledgment of Licensor’s proprietary rights in same.
        
License-File: LICENSE.md
Keywords: AI,Federated,Federated Computing,Federated Learning,Rhino,Rhino FCP,Rhino Federated Computing,Rhino Federated Computing Platform,Rhino Health,SDK
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: arrow<2.0,>=1.2.1
Requires-Dist: backoff<3.0,>=2.1.1
Requires-Dist: funcy<3.0,>=1.16
Requires-Dist: pydantic<3.0,>=2.5
Requires-Dist: ratelimit<3.0,>=2.2.1
Requires-Dist: requests<3.0,>=2.28
Requires-Dist: typing-extensions<5.0,>=4.8.0
Provides-Extra: dev
Requires-Dist: hatch<2,>=1.16; extra == 'dev'
Requires-Dist: myst-parser<3,>=2; extra == 'dev'
Requires-Dist: numpydoc<1.7,>=1.6.0; extra == 'dev'
Requires-Dist: pydata-sphinx-theme<0.15.3,>=0.14.4; extra == 'dev'
Requires-Dist: sphinx-autoapi<3.1,>=3.0; extra == 'dev'
Requires-Dist: sphinx-sitemap<2.6,>=2.5; extra == 'dev'
Requires-Dist: sphinx<8,>=7; extra == 'dev'
Provides-Extra: kaplan-meier
Requires-Dist: statsmodels<0.15,>=0.12.0; extra == 'kaplan-meier'
Provides-Extra: lint
Requires-Dist: black; extra == 'lint'
Requires-Dist: isort; extra == 'lint'
Requires-Dist: pylint; extra == 'lint'
Provides-Extra: test
Requires-Dist: coverage<=8,>7; extra == 'test'
Requires-Dist: factory-boy<3.3,>=3.2.1; extra == 'test'
Requires-Dist: pytest>=6.0.0; extra == 'test'
Requires-Dist: responses<0.25,>=0.23.1; extra == 'test'
Requires-Dist: tox<5,>=4; extra == 'test'
Description-Content-Type: text/markdown

# Rhino Federated Computing SDK (Rhino SDK)

Programmatic interface for interacting with the **Rhino Federated Computing Platform**.

## Example Usage
Please see the sample notebook files provided to you by the Rhino Team for additional use cases.

### Create a session

```python
import rhino_health

my_username = "rhino_user@rhinohealth.com" # Replace me
my_password = "ASecurePasswordYouSet321" # Replace me
session = rhino_health.login(username=my_username, password=my_password)
```

There will be three ways to interact with the API after you have a session
1. Use defined endpoints under lib/endpoints for single actions
2. Use our library functions for commonly performed advanced features
3. Use our low level API Interface (advanced users)

### Interact with the API via defined endpoints

We've included convenience functions for our most commonly used endpoints in the library with required input and output
data classes. These can be found in `rhino_health/lib/endpoints`.

```python
my_projects = session.project.get_projects()
my_first_project = my_projects[0]
my_first_project.add_collaborator(collaborating_workgroup_uid)

my_dataset = session.dataset.get_dataset(my_dataset_uid)
dataset_project = my_dataset.project
my_dataset_info = my_dataset.dataset_info
```

### Library Functions

Rhino also provides library functions which combine our basic building blocks to perform common actions.

Example:
```python
from rhino_health.lib.metrics import RocAucWithCI

metric_configuration = RocAucWithCI(y_true_variable="label", y_pred_variable="pred", confidence_interval=95, timeout_seconds=600)
"""
data_filters=[{
        "filter_column":"is_roc",
        "filter_value":1
    }]
"""
result = my_dataset.get_metric(metric_configuration)
print(f"{result.output}")
```

### Interact using the low level API

Please contact us for support with interacting with our low level API.

### Rate Limits
The Rhino SDK handles rate limits of the API for you if you use the same session between threads and will attempt to queue requests.
Excess requests will be sent with exponential backoff. If you send requests to our server from multiple locations
then you may run into exceptions.

## Development Notes

You may need to use `pip install -r requirements.txt --no-cache-dir` on M1 Macs


