DigitalTwin - Data Space
DigitalTwin Data Sapce is a Python package for creating, managing, and querying data spaces, with a focus on modular data pipelines and digital twin applications. It provides a flexible framework to define, schedule, and run data collectors, harvesters, and handlers, supporting complex data workflows and dependencies.
Features
- Modular Components: Define custom Collectors, Harvesters, and Handlers for your data workflows.
- Configuration-Driven: Easily configure your data pipeline using TOML files.
- Dependency Management: Automatically resolves and schedules component dependencies.
- CLI Interface: Run, schedule, and manage your data pipeline from the command line.
- Extensible: Add new data sources, processing steps, or outputs by implementing new components.
Installation
pip install digitaltwin_dataspace
Or, for development:
git clone https://github.com/GaspardMerten/digitaltwin_dataspace.git
cd digitaltwin_dataspace
pip install -e .
Dependencies:
- Python 3.8+
- requests
- SQLAlchemy
- azure-storage-blob
- schedule
- dotenv
(See pyproject.toml for the full list.)
Usage
Command Line Interface
The main entry point is the dt-dataspace CLI:
dt-dataspace --config-folder path/to/config [options]
Key options:
--config-folder: Path to the configuration folder (default:config)--init-dependencies: Run all harvesters in dependency order--handlers: List of handler names to run--collectors: List of collector names to run--harvesters: List of harvester names to run--now: Run harvesters or collectors once and exit--port: Port for the handlers server (default: 8888)--host: Host for the handlers server (default: localhost)--allowed-hosts: Allowed hosts for the handlers server--log-level: Set logging level (DEBUG,INFO, etc.)--parquetize: List of harvester names to run for parquet output
Project Structure
digitaltwin_dataspace/
│
├── components/
│ ├── collector.py # Base Collector class
│ ├── handler.py # Base Handler class
│ └── harvester.py # Base Harvester class
│
├── configuration/
│ ├── load.py # Loads and parses component configuration
│ └── model.py # Configuration data models
│
├── data/
│ ├── sync_db.py # Database sync logic
│ ├── retrieve.py # Data retrieval utilities
│ └── ... # Other data management modules
│
├── cli.py # Command-line interface
└── ...
Components
-
Collector:
Gathers data from external sources. Implement theCollectorabstract class and itsrun()method. -
Harvester:
Processes or transforms collected data. Implement theHarvesterabstract class and itsrun()method. -
Handler:
Serves or exposes processed data, e.g., via an API. Implement theHandlerabstract class and itsrun()method.
You can add your own components by subclassing these base classes and registering them in your configuration.
Configuration
Configuration is done via TOML files in your config folder (default: config/).
Each file can define multiple collectors, harvesters, and handlers, specifying:
DATA_TYPE,DATA_FORMATPATH(Python import path to your component)SCHEDULE(optional, for scheduling)SOURCE,DEPENDENCIES(for workflow chaining)- Other custom parameters
See digitaltwin_dataspace/configuration/load.py for all supported options.
Author
Gaspard Merten
gaspard@norse.be
License
Attribution-NonCommercial-ShareAlike 4.0 International
Links
Release files for digitaltwin-dataspace 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| digitaltwin_dataspace-0.0.1.tar.gz | 15.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| digitaltwin_dataspace-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.3 kB
Release files / digitaltwin_dataspace-0.0.1.tar.gz
| Download URL | digitaltwin_dataspace-0.0.1.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d202ca4020a928288992e5e011790fd49012e3f15ffce6a1814c85f714eb1ca2
|
|
BLAKE2b-256 checksum How to use checksums |
5c44c42e63dba4ca4fa4602ec7243afea204cd09962b9704f50af78cbcd54f45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2025.
Transparency logRelease files / digitaltwin_dataspace-0.0.1-py3-none-any.whl
| Download URL | digitaltwin_dataspace-0.0.1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ab2156650b7109cf3553faf1c1c878c825093fcbede72b4aef7ed182b862b29
|
|
BLAKE2b-256 checksum How to use checksums |
2e0a05d7e1e3e1b324a693b6e9aef8f334131ffe2cf1d1fa85afe68e3b375d86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2025.
Transparency log