Skip to main content

Sync agent for managing eTiKeT data synchronization from various backend sources

Project description

eTiKeT Sync Agent

A Python library for synchronizing scientific data from various backend sources to the eTiKeT platform.

Overview

The eTiKeT Sync Agent provides a unified interface for automatically discovering and synchronizing experimental datasets from different data acquisition systems. It supports both database-backed sources (e.g., QCoDeS, Core-tools) and file-based sources (e.g., Quantify, Labber, generic folder structures).

Key Features

  • Plugin-based backend system — Easily extensible architecture using Python entry points
  • Multiple data source support — Native eTiKeT, QCodes, Quantify, Labber, Core-tools, and generic folder-based sources
  • Live dataset synchronization — Real-time sync for ongoing measurements
  • File converters — Transform data formats during synchronization
  • Persistent tracking — SQLite database for tracking the sync state of each dataset
  • Manifest-based file monitoring — Efficient change detection for file-based sources

Supported Backends

Backend Type Description
etiket_sync_agent_native Native eTiKeT native datasets
etiket_sync_agent_folderbase File-based Generic folder structures
etiket_sync_agent_qcodes Database QCoDeS measurement databases
etiket_sync_agent_quantify File-based Quantify scheduler data
etiket_sync_agent_labber File-based Labber measurement files
etiket_sync_agent_core_tools Database Core-tools measurements

Installation

We recommend using the qdrive package to install and manage the sync agent as a background service. See the QHarbor documentation for setup instructions.

For standalone installation:

pip install etiket_sync_agent

Install backends as needed:

pip install etiket_sync_agent_qcodes
pip install etiket_sync_agent_quantify

Usage

The sync agent is typically run as a background service managed by the qdrive package. Once configured, it continuously monitors your data sources and synchronizes new datasets to eTiKeT.

Running Manually

To run the sync agent manually:

python -m etiket_sync_agent

For more control (e.g., enabling debug logging), you can run the sync loop directly:

import logging
import sys

# Configure logging
logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
    handlers=[logging.StreamHandler(sys.stdout)]
)

from etiket_sync_agent.run import sync_loop

# Run sync loop: 0 = run indefinitely, N = run N iterations
sync_loop(0)

CLI Tools

The package provides CLI tools to scaffold new backends and converters. These scaffolds give you a ready-to-use package structure with all the boilerplate code in place—just fill in your implementation logic.

How It Works

The generated packages include pre-configured entry points in their pyproject.toml. Once installed, the sync agent automatically discovers and registers these backends or converters via Python's entry points mechanism.

Tip: For working examples, check out the existing backend packages like etiket-sync-agent-qcodes on PyPI.

Need help? Contact us at support@qharbor.nl.


Generate Backend Scaffold

Creates a new sync agent backend package for synchronizing data from a specific source (e.g., a database, file system, or instrument).

generate_sync_agent_scaffold <backend> [options]

Arguments:

Argument Description
backend Identifier for your backend (e.g., qcodes, labber, my-instrument)

Options:

Option Default Description
--version 0.0.1 Initial package version
--dependency Add a dependency (repeatable). You can also edit pyproject.toml manually.
--base database Base class template: database or file (see below)
--default-scope REQUIRED Scope assignment policy (see below)
--live-sync False Set to True if you plan to implement live synchronization
--level -1 File-based only. Directory level for dataset detection (see below)

Understanding --base:

  • database — Use when syncing from a database (e.g., SQLite from QCoDeS). The sync agent queries the database for new datasets.
  • file — Use when syncing folder-based datasets where each folder or file represents a dataset.

Understanding --default-scope:

  • REQUIRED — Users must specify the target scope (project/folder) for each sync source.
  • OPTIONAL — A default scope can be inferred, but users may override it.
  • DISABLED — The backend determines the scope automatically; users cannot change it.

Understanding --level (file-based only):

  • -1 — Every folder containing a _QH_dataset_info.yaml file becomes a dataset.
  • 1 — Each immediate subfolder of the root is a dataset.
  • 2+ — Folders at that depth level become datasets.

Example — Database Backend:

# Create a backend for a custom SQLite database
generate_sync_agent_scaffold my-backend \
    --base database \
    --dependency "sqlalchemy>=2.0" \
    --default-scope REQUIRED

This generates:

etiket-sync-agent-my-backend/
├── pyproject.toml                      # Package config with entry points
└── etiket_sync_agent_my_backend/
    ├── __init__.py                     # Exports sync and config classes
    ├── my_backend_config_class.py   # Configuration dataclass
    └── my_backend_sync_class.py     # Sync logic (implement this)

Example — File-based Backend:

# Create a backend for experiment folders at depth level 2
generate_sync_agent_scaffold lab-data \
    --base file \
    --level 2 \
    --live-sync

Generate Converter Scaffold

Creates a new file converter package for transforming file formats during synchronization (e.g., CSV → HDF5). Converters are used by default in the folderbase backend, but you can also use them in your own custom backends.

generate_converter_scaffold <converter> [options]

Arguments:

Argument Description
converter Identifier for your converter (e.g., csv-to-hdf5, mat-to-zarr)

Options:

Option Default Description
--version 0.0.1 Initial package version
--dependency Add a dependency (repeatable)
--entry-name Custom entry point name (defaults to sanitized converter name)

Example:

# Create a converter for CSV to HDF5
generate_converter_scaffold csv-to-hdf5 \
    --dependency h5py \
    --dependency pandas

This generates:

etiket-sync-agent-csv-to-hdf5-converters/
├── pyproject.toml                           # Package config with entry points
└── etiket_sync_agent_csv_to_hdf5_converters/
    ├── __init__.py                          # Exports converter class
    └── csv_to_hdf5_converter.py             # Converter logic (implement this)

After implementing your converter, install it and the sync agent will automatically use it for matching file types.

License

See LICENCE for details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

etiket_sync_agent-0.3.0b1-cp314-cp314-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.14Windows x86-64

etiket_sync_agent-0.3.0b1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

etiket_sync_agent-0.3.0b1-cp314-cp314-macosx_11_0_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14macOS 11.0+ x86-64

etiket_sync_agent-0.3.0b1-cp314-cp314-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

etiket_sync_agent-0.3.0b1-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

etiket_sync_agent-0.3.0b1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

etiket_sync_agent-0.3.0b1-cp313-cp313-macosx_11_0_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

etiket_sync_agent-0.3.0b1-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

etiket_sync_agent-0.3.0b1-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

etiket_sync_agent-0.3.0b1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

etiket_sync_agent-0.3.0b1-cp312-cp312-macosx_11_0_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

etiket_sync_agent-0.3.0b1-cp312-cp312-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

etiket_sync_agent-0.3.0b1-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

etiket_sync_agent-0.3.0b1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

etiket_sync_agent-0.3.0b1-cp311-cp311-macosx_11_0_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

etiket_sync_agent-0.3.0b1-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

etiket_sync_agent-0.3.0b1-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

etiket_sync_agent-0.3.0b1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

etiket_sync_agent-0.3.0b1-cp310-cp310-macosx_11_0_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

etiket_sync_agent-0.3.0b1-cp310-cp310-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file etiket_sync_agent-0.3.0b1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 a148036e37bf64cf0bf8095ae50987d7605f8f06ee2ef8ad700ec5aab3659e62
MD5 375a9ef435722ed55263738de11f74cc
BLAKE2b-256 c43bf7f18813185e021ad7dc734074396d3b0df27283c40706d2447281bda336

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c0333e90beee0b4596579c555412f81b769532284caae7593b879c57e9fa566f
MD5 487dbf1e807a86124a525c467b85c6c1
BLAKE2b-256 4368b0ee587ef216c5ed9e2eccb7b828e588b71e51b2b2a65db1c5ad1a8c0e95

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp314-cp314-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp314-cp314-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 4681d0a8796f2a09d374f3d66142e20e8edc826ccb275408ad8bebf20f5dc5f5
MD5 aaa3610d3a8f436625200672a01a6675
BLAKE2b-256 f81bdb6cffef88bb0c31d67e0e114ac028f87a3a880ba28f310147049e017a86

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 094ec23b7c3b5d83347a60826607e09364ad8fe24e4d36d26c377a5042bcb488
MD5 2b3141751b2575cd9e8c2c9927fd47d5
BLAKE2b-256 cf879bdbe8e73b8f2e1511b199acdcb710ff722cb778c3a384accab0dcafcb8a

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 792086b19cf9c28859faba97b91cbd9d8cd6c38dc3308bc3350795f90c9b36a6
MD5 cf12b32074e500fe8fd10fc1ed40b572
BLAKE2b-256 686c131fbf050f02d74985debd82ebcb94c948080213dee0892fe4743a271fc9

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 70fce8b4c60ed0dcdcc0e390e5db0a0946708e15981653e9fee3159828283360
MD5 1250dc03626be3eb75d796ff6574817b
BLAKE2b-256 9d2d664d0ee4caa478ecaa61b40568ae396b00015732852957dcdd9c1c36d37f

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 709e94231880b966d49a84e0c131a5282ae4251fe0ee994e400f04b6fc90eea5
MD5 5bab7a97703d86fbd40028bb29b3de82
BLAKE2b-256 089621fdb448580e9409f58a232d3761e7b8c1107f5e8e4b99b8e17cf79e1887

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a440f33a1973e0d515f8e15453a03ea12ee2e50029ad5020726ba5d1d860ddee
MD5 d3cc5bc5045a8ec07dc05d2dd8417d6e
BLAKE2b-256 569e2fba5c329fee9b3fcd72abe1daef8777b72ce55dd69a7d0eeaec09002254

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3b4fcb4c2517cf675ec6cfcffed3a9fd17b622b773a94bd99651c393b530e72e
MD5 943a4929d04a1ffafed4dc942ebe9d70
BLAKE2b-256 318b55e02f0161d52dd5b042c1583884db829c9857d60e56c0c8d3071021f670

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cb3b98490c291c8b0d6374b2be7a3f6329940cc7bc4c2758f30198882d5b7a65
MD5 9753dde0861cb4bbf54ff355827165e2
BLAKE2b-256 49548ece7ca2ee6ae1a96569f9049f2256ff8bcec34506197a6a16e5caa36cd1

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 12a2cb1b1a990e82b73dc611f24710e2e90f118e46cd0a6ad9cc64784beea8ad
MD5 9064f455ff00bfb70808e605fbeed684
BLAKE2b-256 4a88319c876b406f10a0d09d2b86915387cd1c8b63373f49347b11d739f5bb76

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 26c30529f2fd232cf0dffe61f88c9f038e10a1b5e4054f0053f963cdb5de9e14
MD5 576b3af12eca71b859d442c50aee1a04
BLAKE2b-256 da46eaefd826d92c695ce24d8e9cc2caad412e74596d300f937406f01df9bd17

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 63d7993bee6c15f1fec280546457456281de034f02486300a3e121cc14c85be2
MD5 a923ff098dd2dadecf99e0e86dfcb38f
BLAKE2b-256 aa2d7909f190ea3505f465ec269f3450504bd9f3fb259374bf48871a1b28c931

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2327414b1b51c8648aab67a24d671f1dfca54e035e30a64274102b828a37a60d
MD5 df037731ad66fdce01eb3776c24ad905
BLAKE2b-256 7460841818f56a3bbdadedff9354903d5052293cac1675e9534ac91702b066f2

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d08d5eed15966c082ecb5e6c555803302fc3e91a05bd0b397469163181c08c44
MD5 90a50d88c53c0371861aadbff5614544
BLAKE2b-256 aa08ca388d697e47a00ca2ce849ea4dfa0e2a8be138bf76e705aa59510af5440

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1bfd4b53437e04653bb4b296de4144db464c7011d16aceda58f749664f324047
MD5 b7adf4f4c73f2a8163689d40b9df34da
BLAKE2b-256 dd413906c374522d895dbedb90f2e13d927544b1d5869ecea57a0f2fdc3cf2f8

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7c9e9aed1badd2cffe6bc81507177d1a1f59902cc467ee7720ee4746f4b5dfc5
MD5 bdacce5c0f1d74e87e20752d3da53175
BLAKE2b-256 b6d9fccd9e2e902a0b776735e045d9ceb3f6650eced257c6b265e27ffb8b8c0d

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b776f697f620267ffd4e8f1c6289ae6727dd48d18114c1f7312b1ac2c2767214
MD5 994fd3ba91305411383f67354ee08ccd
BLAKE2b-256 8b118143b5855bab4401b70c186740d5a3f07095345a567d15524d5461b96090

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 935479722f05e8a214d62445280cc095cc5e434315e875859693bb0ce595078b
MD5 e17164602a729db5b06feb840f5d2937
BLAKE2b-256 05af8ae205d596097e9cd40b5dc4c24f9597f96e32e9f3ec7217baeb3293534c

See more details on using hashes here.

File details

Details for the file etiket_sync_agent-0.3.0b1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for etiket_sync_agent-0.3.0b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22633aaf2a92930d3baff40178196bd4255437cce99c7f2eb72cf8792192aaa3
MD5 2cf50057bef0bfdf659fe55ab2d00f1b
BLAKE2b-256 8375f8a343bb6cc36a49781ced1e025697b5336a2f5423a20e633f86f65ece3d

See more details on using hashes here.

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