Metadata-Version: 2.1
Name: minerva-lib
Version: 0.0.4
Summary: Minerva Python library
Home-page: https://github.com/sorgerlab/minerva-lib-python
Author: D.P.W. Russell, Juha Ruokonen
Author-email: douglas_russell@hms.harvard.edu, juha_ruokonen@hms.harvard.edu
License: MIT
Download-URL: https://github.com/sorgerlab/minerva-lib-python/archive/v0.0.4.tar.gz
Keywords: minerva,library,microscopy
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: numpy (>=1.18)
Requires-Dist: boto3 (>=1.12.39)
Requires-Dist: requests (==2.22.0)
Requires-Dist: scikit-learn
Requires-Dist: tifffile (>=2020.11.26)
Requires-Dist: importlib-resources
Requires-Dist: s3transfer
Requires-Dist: imagecodecs
Requires-Dist: zarr

# minerva-lib-python
Minerva Python Library contains common code for the Minerva suite, such as:
* High performance server-side rendering code implemented in native C code
* Minerva client for making requests to Minerva API
* High level utility classes for importing and exporting images 

## Using the Minerva API
### Authentication
```python
from minerva_lib.client import MinervaClient

client = MinervaClient(endpoint="MINERVA_BASE_URL", region="AWS_REGION", cognito_client_id="CLIENT_ID")
client.authenticate(username="USERNAME", password="PASSWORD")
```
### Fetch raw image tiles
```python
# Credentials will be valid for 1 hour
credentials, bucket, prefix = client.get_image_credentials("IMAGE_UUID")

# Returns a bytes object
res = client.get_raw_tile(credentials, bucket, "IMAGE_UUID", x=0, y=0, z=0, t=0, c=0, level=0)
```




