Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Module madsci.data_manager

MADSci Data Manager - Data capture, storage, and querying.

The Data Manager provides centralized DataPoint storage and retrieval for scientific experiments in MADSci-powered laboratories. It handles JSON data values, file storage, and integration with cloud object storage systems.

Key Features

Storage Backends

Components

Usage Example

The Data Manager is typically run as a standalone service:

.. code-block:: bash

# Run the Data Manager server
python -m madsci.data_manager.data_server

# Or use Docker Compose
docker compose up data-manager

For programmatic access, use the DataClient from madsci.client:

.. code-block:: python

from madsci.client.data_client import DataClient
from madsci.common.types.datapoint_types import DataPoint, DataPointTypeEnum

client = DataClient(data_server_url="http://localhost:8004")

# Store JSON data
json_dp = DataPoint(
    label="Temperature Reading",
    data_type=DataPointTypeEnum.JSON,
    value={"temperature": 23.5, "unit": "Celsius"}
)
stored = client.submit_datapoint(json_dp)

# Store files
file_dp = DataPoint(
    label="Experiment Log",
    data_type=DataPointTypeEnum.FILE,
    path="/path/to/data.txt"
)
stored_file = client.submit_datapoint(file_dp)

# Retrieve data
retrieved = client.get_datapoint(stored.datapoint_id)

Configuration

The Data Manager uses environment variables with the DATA_ prefix:

For object storage, use the OBJECT_STORAGE_ prefix:

See Also

Sub-modules