Skip to main content

Utilities for advanced users of eLTER Data asset registry

Project description

eLTER DAR utilities

Utilities for advanced users of eLTER Data Asset Registry

Installation

Simply run:

pip install dar-utilities

Usage

The package is designed as a collection of utilities grouped by the role of the user.

For help, run:

python -m dar_utilities --help

Data Provider (curator)

This module contains utilities for creating drafts and submitting datasets to the DAR.

Upload module (upload)

usage: dar_utilities curator upload [-h] -m METADATA -d DATA [-t TOKEN]
options:
  -h, --help            show this help message and exit
  -m METADATA, --metadata METADATA
                        Path to metadata file
  -d DATA, --data DATA  Path to a directory containing data files
  -t TOKEN, --token TOKEN
                        Path to a file containing API token. If not set, the token will be read from the environment variable `DAR_API_TOKEN`.

To upload a dataset, run:

python -m dar_utilities curator upload -m <metadata_file> -d <data_directory>

Usage as Python module

The package can also be used as a Python module. For example, to upload a dataset, you can use the following code:

from dar_utilities.curator.upload import create_dataset_draft, UploadArgs

def main():
    create_dataset_draft(UploadArgs("/path/to/metadata_file", "/path/to/data_directory", "api_token"))

if __name__ == "__main__":
    main()

Project details


Download files

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

Source Distribution

dar_utilities-0.4.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

dar_utilities-0.4.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file dar_utilities-0.4.0.tar.gz.

File metadata

  • Download URL: dar_utilities-0.4.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for dar_utilities-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5f45a96e4624df415fd0ce9a197bad9d5d45f16f760e6ee5d37a42de328f8adb
MD5 5630db0e56c5685bf4e7d10875a057c8
BLAKE2b-256 bdbb3d91916a79ea815725c4ea624e7c928e47e42db4d19bc5c2b9994b78a8a5

See more details on using hashes here.

File details

Details for the file dar_utilities-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: dar_utilities-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for dar_utilities-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e418e448a974a5017279011485ebea0a214f214552517dc9c784adb9fe2e31e2
MD5 2e85485ce660b14086f33be74788189c
BLAKE2b-256 b56a509afc8d141ff1f7c8abd2ce5b54fc004617288c00244a6eaf3ddc956dc3

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