Skip to main content

fair-software.nl recommendations

Badges

1. Code repository

GitHub Badge

2. License

License Badge

3. Community Registry

PyPI Badge

4. Enable Citation

Zenodo Badge

DM-Report

This is a package and command-line utility to collect data from Digital Matter trackers.

Installation

  1. Clone or download the source code:

    git clone https://github.com/ITC-CRIB/dm-report.git
  2. Go to the root directory:

    cd dm-report/
  3. Compile and install using pip:

    pip install .

CLI Usage

Usage: dmreport [OPTIONS] {assets|telemetry}

  Retrieves tracker reports.

Options:
  -u, --username TEXT             Account user name.  [required]
  -p, --password TEXT             Account password.  [required]
  -g, --organisation TEXT         Organisation id.
  --asset TEXT                    Asset code.
  --date [%Y-%m-%d]               Telemetry date.  [default: 2025-02-17]
  --days INTEGER RANGE            Number of days.  [default: 1; x>=1]
  -o, --output PATH               Path to store the output.
  -f, --format [csv|json|text|markdown]
                                  Output format.  [default: text]
  -d, --debug                     Enable debug mode.
  -v, --version                   Show the version and exit.
  -h, --help                      Show this message and exit.

Instead of passing arguments to command-line utility, you can also use the following environment variables:

  • DM_USERNAME: Username.

  • DM_PASSWORD: Password.

  • DM_ORGANISATION_ID: Organisation id.

If a .env file exists in the working directory, the command-line utility automatically reads environment variables from the file.

Basic example to retrieve information about the assets as CSV:

dmreport assets --format csv --output assets.csv

Basic example to retrieve telemetry information of an asset for a specified number of days starting from a starting date as CSV:

dmreport telemetry --asset my_asset --date 2025-01-02 --days 15 --format csv --output telemetry.csv

Package Usage

Basic example to retrieve information about the assets:

from dmreport.client import Client

# Create a client
client = Client('username', 'password', organisation_id = 'organisation_id')

# Retrieve assets report
assets = client.get_assets()

Basic example to retrieve telemetry data of an asset for a specific date:

from dmreport.client import Client
from datatime import datetime

# Create a client
client = Client('username', 'password', organisation_id = 'organisation_id')

# Get asset telemetry
telemetry = client.get_telemetry(
    client.get_asset_id('asset_code'),
    datetime.strptime('yyyy-mm-dd', '%Y-%m-%d')
)

Acknowledgements

This software was developed as part of the research project SmartAvocado funded by the Dutch Research Council (NWO) Open Competition Domain Science XS 2023.

Metadata

Release files for DM-Report 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DM-Report 0.1.1
File Size Uploaded
dm_report-0.1.1.tar.gz 31.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DM-Report 0.1.1
File Interpreter ABI Platform
dm_report-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 62.9 kB

Release files / dm_report-0.1.1.tar.gz

Download URL dm_report-0.1.1.tar.gz
Size 31.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3548fd157934ca1c1f1d7ee33907e468e95b88257244f27b82f815803552f631
BLAKE2b-256 checksum
How to use checksums
1d33a7da6266637fa17de4f58f2069806603341ab46c06edc008e7458ba4e46b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / dm_report-0.1.1-py3-none-any.whl

Download URL dm_report-0.1.1-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5141eca16ff6210bb2ccde117a187454be390a6b6c627c3964263f6a220a35a1
BLAKE2b-256 checksum
How to use checksums
11aec0fc12ba5ad625ef9f230c3b5fb1f8f5a7670ed0774c9cd4c82da2523417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page