Skip to main content

A library for interacting with the Datamint API, designed for efficient data management, processing and Deep Learning workflows.

Project description

Datamint Python API

Build Status Python 3.10+

A comprehensive Python SDK for interacting with the Datamint platform, providing seamless integration for medical imaging workflows, dataset management, and machine learning experiments.

📋 Table of Contents

🚀 Features

  • Dataset Management: Download, upload, and manage medical imaging datasets
  • Annotation Tools: Create, upload, and manage annotations (segmentations, labels, measurements)
  • Experiment Tracking: Integrated MLflow support for experiment management
  • PyTorch Lightning Integration: Streamlined ML workflows with Lightning DataModules and callbacks
  • DICOM Support: Native handling of DICOM files with anonymization capabilities
  • Multi-format Support: PNG, JPEG, NIfTI, and other medical imaging formats

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

📦 Installation

[!NOTE] We recommend using a virtual environment to avoid package conflicts.

From PyPI

pip install -U datamint

Virtual Environment Setup

Click to expand virtual environment setup instructions

We recommend that you install Datamint in a dedicated virtual environment, to avoid conflicting with your system packages. For instance, create the enviroment once with python3 -m venv datamint-env and then activate it whenever you need it with:

  1. Create the environment (one-time setup):

    python3 -m venv datamint-env
    
  2. Activate the environment (run whenever you need it):

    Platform Command
    Linux/macOS source datamint-env/bin/activate
    Windows CMD datamint-env\Scripts\activate.bat
    Windows PowerShell datamint-env\Scripts\Activate.ps1
  3. Install the package:

    pip install datamint
    

⚙ 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 for more details.

Method 2: Environment variable

Specify the API key as an environment variable.

Bash:

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

Python:

import os
os.environ["DATAMINT_API_KEY"] = "my_api_key"

📚 Documentation

Resource Description
🚀 Getting Started Step-by-step setup and basic usage
📖 API Reference Complete API documentation
🔥 PyTorch Integration ML workflow integration
💡 Examples Practical usage examples

🛠️ Command Line Tools

Full documentation at command_line_tools.

Upload Resources

Upload DICOM files with anonymization:

datamint-upload /path/to/dicoms --recursive --channel "training-data" --publish --tag "my_data_tag"

It anonymizes by default.

Configuration Management

# Interactive setup
datamint-config

# Set API key
datamint-config --api-key "your-key"

🆘 Support

Full Documentation
GitHub Issues

Project details


Release history Release notifications | RSS feed

This version

2.5.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datamint-2.5.0.tar.gz (143.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datamint-2.5.0-py3-none-any.whl (170.9 kB view details)

Uploaded Python 3

File details

Details for the file datamint-2.5.0.tar.gz.

File metadata

  • Download URL: datamint-2.5.0.tar.gz
  • Upload date:
  • Size: 143.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datamint-2.5.0.tar.gz
Algorithm Hash digest
SHA256 bc04e11129d45ba85cd4eca2087341bf952eb860faa9151ac1bff01b01a7a71a
MD5 2c86024634dd1135c44d9d2632cca100
BLAKE2b-256 9f266e7ec4a1834c1c4421659d3341c7a2461af6c9eca8eb9f711c987e1ac38a

See more details on using hashes here.

Provenance

The following attestation bundles were made for datamint-2.5.0.tar.gz:

Publisher: release_pypi.yaml on SonanceAI/datamint-python-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datamint-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: datamint-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 170.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datamint-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc34aa3d850b4f3e4f31141ab080ccbeae914a739b944b83cb9e9796e09bbff3
MD5 d3d8c111d4d5aa452f1482671c7cb2ae
BLAKE2b-256 d427c109d9c0391ecd0b60d0bc41fb969a4904d8d59cef854651baf4766a2ee8

See more details on using hashes here.

Provenance

The following attestation bundles were made for datamint-2.5.0-py3-none-any.whl:

Publisher: release_pypi.yaml on SonanceAI/datamint-python-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page