Metadata-Version: 2.4
Name: datamint
Version: 2.1.3
Summary: A library for interacting with the Datamint API, designed for efficient data management, processing and Deep Learning workflows.
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
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
Provides-Extra: dev
Provides-Extra: docs
Requires-Dist: Deprecated (>=1.2.0)
Requires-Dist: aiohttp (>=3.0.0,<4.0.0)
Requires-Dist: aioresponses (>=0.7.8,<0.8.0) ; extra == "dev"
Requires-Dist: albumentations (>=2.0.0)
Requires-Dist: datamintapi (==0.0.*)
Requires-Dist: httpx
Requires-Dist: humanize (>=4.0.0,<5.0.0)
Requires-Dist: lazy-loader (>=0.3.0)
Requires-Dist: lightning
Requires-Dist: matplotlib
Requires-Dist: medimgkit (>=0.6.6)
Requires-Dist: nest-asyncio (>=1.0.0,<2.0.0)
Requires-Dist: nibabel (>=4.0.0)
Requires-Dist: numpy
Requires-Dist: opencv-python (>=4.0.0)
Requires-Dist: pandas (>=2.0.0)
Requires-Dist: platformdirs (>=4.0.0,<5.0.0)
Requires-Dist: pydantic (>=2.6.4)
Requires-Dist: pydicom (>=3.0.0,<4.0.0)
Requires-Dist: pylibjpeg (>=2.0.0,<3.0.0)
Requires-Dist: pylibjpeg-libjpeg (>=2.0.0,<3.0.0)
Requires-Dist: pytest (>=7.0.0,<8.0.0) ; extra == "dev"
Requires-Dist: pytest-cov (>=4.0.0,<5.0.0) ; extra == "dev"
Requires-Dist: pyyaml (>=5.0.0)
Requires-Dist: requests (>=2.0.0,<3.0.0)
Requires-Dist: responses (>=0.20.0,<0.21.0) ; extra == "dev"
Requires-Dist: rich (>=10.0.0)
Requires-Dist: setuptools (>=57.0) ; extra == "docs"
Requires-Dist: sphinx (>=5.0) ; extra == "docs"
Requires-Dist: sphinx-tabs (>=3.0.0) ; extra == "docs"
Requires-Dist: sphinx_rtd_theme (>=2.0.0) ; extra == "docs"
Requires-Dist: torch (>=1.2.0,!=2.3.0)
Requires-Dist: torchvision (>=0.18.0)
Requires-Dist: tqdm (>=4.0.0,<5.0.0)
Requires-Dist: typing_extensions (>=4.0.0)
Description-Content-Type: text/markdown


# Datamint python API

![Build Status](https://github.com/SonanceAI/datamint-python-api/actions/workflows/run_test.yaml/badge.svg)

See the full documentation at https://sonanceai.github.io/datamint-python-api/

## Installation

Datamint requires Python 3.10+.
You can install/update Datamint and its dependencies using pip

```bash
pip install -U datamint
```

We recommend that you install Datamint in a dedicated virtual environment, to avoid conflicting with your system packages.
Create the enviroment once with `python3 -m venv datamint-env` and then activate it whenever you need it with:
- `source datamint-env/bin/activate` (Linux/MAC)
- `datamint-env\Scripts\activate.bat` (Windows CMD)
- `datamint-env\Scripts\Activate.ps1` (Windows PowerShell)


## Setup API key

To use the Datamint API, you need to setup your API key (ask your administrator if you don't have one). Use one of the following methods to setup your API key:

### Method 1: Command-line tool (recommended)

Run ``datamint-config`` in the terminal and follow the instructions. See [command_line_tools](https://sonanceai.github.io/datamint-python-api/command_line_tools.html) for more details.

### Method 2: Environment variable

Specify the API key as an environment variable.

**Bash:**
```bash
export DATAMINT_API_KEY="my_api_key"
# run your commands (e.g., `datamint-upload`, `python script.py`)
```

**Python:**
```python
import os
os.environ["DATAMINT_API_KEY"] = "my_api_key"
```

### Method 3: Api constructor

Specify API key in the Api constructor:

```python
from datamint import Api
api = Api(api_key='my_api_key')
```

## Tutorials


You can find example notebooks in the `notebooks` folder:

- [Uploading your resources](notebooks/upload_data.ipynb)
- [Uploading model segmentations](notebooks/upload_model_segmentations.ipynb)

and example scripts in [examples](examples) folder:

- [API usage examples](examples/api_usage.ipynb)
- [Project and entity usage](examples/project_entity_usage.ipynb)
- [Channels example](examples/channels_example.ipynb)

## Full documentation

See all functionalities in the full documentation at https://sonanceai.github.io/datamint-python-api/

