# Rhino Health SDK
Programmatic interface for interacting with the **Rhino Health** Federated Learning Platform.
## Example Usage
Please see the sample notebook files provided to you by the Rhino Health 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
RhinoHealth 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
Raw data
{
"_id": null,
"home_page": null,
"name": "rhino-health",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Rhino Health <rhino-sdk@rhinohealth.com>",
"keywords": "SDK, Rhino, Rhino Health, Federated Learning, Federated, AI",
"author": null,
"author_email": "Rhino Health <rhino-sdk@rhinohealth.com>",
"download_url": null,
"platform": null,
"description": "# Rhino Health SDK\n\nProgrammatic interface for interacting with the **Rhino Health** Federated Learning Platform.\n\n## Example Usage\nPlease see the sample notebook files provided to you by the Rhino Health Team for additional use cases.\n\n### Create a session\n\n```python\nimport rhino_health\n\nmy_username = \"rhino_user@rhinohealth.com\" # Replace me\nmy_password = \"ASecurePasswordYouSet321\" # Replace me\nsession = rhino_health.login(username=my_username, password=my_password)\n```\n\nThere will be three ways to interact with the API after you have a session\n1. Use defined endpoints under lib/endpoints for single actions\n2. Use our library functions for commonly performed advanced features\n3. Use our low level API Interface (advanced users)\n\n### Interact with the API via defined endpoints\n\nWe've included convenience functions for our most commonly used endpoints in the library with required input and output\ndata classes. These can be found in `rhino_health/lib/endpoints`.\n\n```python\nmy_projects = session.project.get_projects()\nmy_first_project = my_projects[0]\nmy_first_project.add_collaborator(collaborating_workgroup_uid)\n\nmy_dataset = session.dataset.get_dataset(my_dataset_uid)\ndataset_project = my_dataset.project\nmy_dataset_info = my_dataset.dataset_info\n```\n\n### Library Functions\n\nRhinoHealth also provides library functions which combine our basic building blocks to perform common actions.\n\nExample:\n```python\nfrom rhino_health.lib.metrics import RocAucWithCI\n\nmetric_configuration = RocAucWithCI(y_true_variable=\"label\", y_pred_variable=\"pred\", confidence_interval=95, timeout_seconds=600)\n\"\"\"\ndata_filters=[{\n \"filter_column\":\"is_roc\",\n \"filter_value\":1\n }]\n\"\"\"\nresult = my_dataset.get_metric(metric_configuration)\nprint(f\"{result.output}\")\n```\n\n### Interact using the low level API\n\nPlease contact us for support with interacting with our low level API.\n\n### Rate Limits\nThe Rhino SDK handles rate limits of the API for you if you use the same session between threads and will attempt to queue requests.\nExcess requests will be sent with exponential backoff. If you send requests to our server from multiple locations\nthen you may run into exceptions.\n\n## Development Notes\n\nYou may need to use `pip install -r requirements.txt --no-cache-dir` on M1 Macs\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Standard Development Kit for interacting with the Rhino Health Federated Learning Platform",
"version": "1.3.3",
"project_urls": {
"Documentation": "https://rhinohealth.github.io/rhino_sdk_docs/html/autoapi/index.html",
"Homepage": "https://www.rhinohealth.com/"
},
"split_keywords": [
"sdk",
" rhino",
" rhino health",
" federated learning",
" federated",
" ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3df4b2493c88674a3ad4716b6dad9d36cce1921228b853c2c56f92c41cbb6ec0",
"md5": "0bf64668d3e0368231b2e989bff75247",
"sha256": "d04d405452f89763e4b23f009714bdc9954baf76b295137efbd022ad4b43d949"
},
"downloads": -1,
"filename": "rhino_health-1.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0bf64668d3e0368231b2e989bff75247",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 103337,
"upload_time": "2024-11-27T14:44:20",
"upload_time_iso_8601": "2024-11-27T14:44:20.083079Z",
"url": "https://files.pythonhosted.org/packages/3d/f4/b2493c88674a3ad4716b6dad9d36cce1921228b853c2c56f92c41cbb6ec0/rhino_health-1.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-27 14:44:20",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "rhino-health"
}