Skip to main content

Datmat is a tool for data materalisation; it gets your data where it is, to where you need it to be.

Project description

Data Materialisation

Getting started

Install datmat from PyPI:

pip install datmat

In datmat you can interface with multiple data sources and storage solutions through a plugin system. By linking together different plugins you can move data from one place to another. A set of plugins is already installed when installing the package, but the program is set up to support development of custom plugins. The plugins can be called by using a URL scheme to preface the path or URL to your file. For example, by using file:///home/user/file.txt you can access the local file /home/user/file.txt, or by using xnat+https://xnat.bmia.nl/projects/sandbox you can access the XNAT project sandbox on xnat.bmia.nl over HTTPS.

See below examples of various use cases.

Downloading from XNAT into EUCAIM directory structure

Through the use of the xnat+https:// plugin it is possible to download files from an XNAT instance. The eucaimdir:// plugin will store the files in the destination folder in the following nested folder structure:

/dest_folder/project_name/subject_label/experiment_label/{scan_id}_{scan_type}/file

The path /dest_folder needs to be supplied with the starting /, so the URL will be eucaimdir:///dest_folder.

A complete project

import datmat

datmat.materialize('xnat+https://xnat.bmia.nl/projects/sandbox',
                   'eucaimdir:///dest_folder',
                   tempdir='/temp_directory')

A single subject

import datmat

datmat.materialize('xnat+https://xnat.bmia.nl/search?projects=sandbox&subjects=TEST01&resources=DICOM',
                   'eucaimdir:///dest_folder',
                   tempdir='/temp_directory')

The datmat package is based on the IOPlugin system of Fastr. See the documentation for the XNATStorage IOPlugin for more information on querying XNAT.

Other use cases

Copy file to file

import datmat

datmat.materialize('file:///input_file',
                   'file:///dest_file',
                   tempdir='/temp_directory')

Copy XNAT to XNAT

To be implemented.

Download files

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

Source Distribution

datmat-0.1.0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

datmat-0.1.0-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file datmat-0.1.0.tar.gz.

File metadata

  • Download URL: datmat-0.1.0.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for datmat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3e8787b96ab7f20ebc923c185fa2abfa6a7b57c5f567ec7bca51b18c5848c72e
MD5 7525263824e7ff3606b3b1e6b8e2be93
BLAKE2b-256 0564072f267d72b6ee4898136d0723184318e347ec31f16ae12af5e0d9f70acc

See more details on using hashes here.

File details

Details for the file datmat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: datmat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for datmat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2872ee7afcde0e20f811165869cbdaeee2de81d0936d6baf5e309a800ba3eb5f
MD5 a755fbf0fcd5f452142e0c66b6a3ff96
BLAKE2b-256 be328434287a6f9db94ff6cb8b3a5a4642185305eb44c2be5c11dfb609eb82ca

See more details on using hashes here.

Supported by

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