MADSci Data Manager
Handles capturing, storing, and querying data generated during experiments - both JSON values and files.
Features
- DataPoint storage: JSON values and files with metadata
- Flexible storage: Local filesystem or S3-compatible object storage (MinIO, AWS S3, GCS)
- Rich metadata: Ownership info, timestamps, custom labels
- Queryable: Search by value and metadata
- Cloud integration: Multi-provider cloud storage support
Installation
See the main README for installation options. This package is available as:
- PyPI:
pip install madsci.data_manager - Docker: Included in
ghcr.io/ad-sdl/madsci - Example configuration: See example_lab/managers/example_data.manager.yaml
Dependencies: MongoDB database, optional MinIO/S3 storage (see example_lab)
Usage
Quick Start
Use the example_lab as a starting point:
# Start with working example
docker compose up # From repo root
# Data Manager available at http://localhost:8004/docs
# Or run standalone
python -m madsci.data_manager.data_server
Manager Setup
For custom deployments, see example_data.manager.yaml for configuration options.
Data Client
Use DataClient to store and retrieve experimental data:
from madsci.client.data_client import DataClient
from madsci.common.types.datapoint_types import ValueDataPoint, FileDataPoint
from datetime import datetime
client = DataClient(url="http://localhost:8004")
# Store JSON data
value_dp = ValueDataPoint(
label="Temperature Reading",
value={"temperature": 23.5, "unit": "Celsius"},
data_timestamp=datetime.now()
)
submitted = client.submit_datapoint(value_dp)
# Store files
file_dp = FileDataPoint(
label="Experiment Log",
path="/path/to/data.txt",
data_timestamp=datetime.now()
)
submitted_file = client.submit_datapoint(file_dp)
# Retrieve data
retrieved = client.get_datapoint(submitted.datapoint_id)
# Save file locally
client.save_datapoint_value(submitted_file.datapoint_id, "/local/save/path.txt")
Examples: See example_lab/notebooks/experiment_notebook.ipynb for data management workflows.
Storage Options
Local Storage (Default)
- Files stored on filesystem
- Simple setup, no additional dependencies
- File paths stored in database
Object Storage (Optional)
Supports S3-compatible storage (MinIO, AWS S3, Google Cloud Storage):
- Automatic upload to object storage
- Fallback to local storage if upload fails
- Better for large files and distributed setups
Object Storage Configuration
See example_data.manager.yaml for MinIO configuration.
Quick setup with example_lab:
docker compose up # Includes pre-configured MinIO
# MinIO Console: http://localhost:9001 (minioadmin/minioadmin)
Cloud Storage Integration
Supports S3-compatible storage providers for large file handling:
Supported Providers
- AWS S3
- Google Cloud Storage (with HMAC keys)
- MinIO (self-hosted or cloud)
- Any S3-compatible service
Configuration Examples
AWS S3:
from madsci.common.types.datapoint_types import ObjectStorageSettings
aws_config = ObjectStorageSettings(
endpoint="s3.amazonaws.com",
access_key="YOUR_ACCESS_KEY",
secret_key="YOUR_SECRET_KEY",
secure=True,
default_bucket="my-bucket",
region="us-east-1"
)
client = DataClient(object_storage_settings=aws_config)
Google Cloud Storage:
gcs_config = ObjectStorageSettings(
endpoint="storage.googleapis.com",
access_key="YOUR_HMAC_ACCESS_KEY",
secret_key="YOUR_HMAC_SECRET",
secure=True,
default_bucket="my-gcs-bucket"
)
Direct Object Storage DataPoints
from madsci.common.types.datapoint_types import ObjectStorageDataPoint
storage_dp = ObjectStorageDataPoint(
label="Large Dataset",
path="/path/to/data.parquet",
bucket_name="my-bucket",
object_name="datasets/data.parquet",
custom_metadata={"version": "v2.1"}
)
uploaded = client.submit_datapoint(storage_dp)
Authentication: Use IAM users/service accounts with appropriate storage permissions. See cloud provider documentation for detailed setup.
Metadata
Release files for madsci.data_manager 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| madsci_data_manager-0.5.0.tar.gz | 15.1 kB | Without provenance | Details for madsci_data_manager-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| madsci_data_manager-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for madsci_data_manager-0.5.0-py3-none-any.whl |
Total release size: 21.1 kB
Release files / madsci_data_manager-0.5.0.tar.gz
| Download URL | madsci_data_manager-0.5.0.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
699d6b0679416b0f4c0729237f0a552a6bcb08077f48c8ce47af622376d870bb
|
|
BLAKE2b-256 checksum How to use checksums |
c106dc4920b7d3fa463c3a99091ebc5851e942ba6252b922e76764936ba07a68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.26.0 CPython/3.9.23 Linux/6.11.0-1018-azure
|
Release files / madsci_data_manager-0.5.0-py3-none-any.whl
| Download URL | madsci_data_manager-0.5.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29bd818cf380714176c4f6671d660654f0e8b030ab72b1f418680f92e57380ad
|
|
BLAKE2b-256 checksum How to use checksums |
c73279923240d850cb39bb6459695a85de85c4d3b36f5c58deab6fe3eab990ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.26.0 CPython/3.9.23 Linux/6.11.0-1018-azure
|
Security for madsci.data_manager 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.