Skip to main content

A package to conveniently use the dabih API

Project description

Dabih Python Package

A Command Line Interface tool to interact with the API of the Dabih Data Storage platform published by the Spang Lab (https://github.com/spang-lab/dabih).

The dabih python package allows you to upload, download, search and list files from the Dabih Data Storage platform, directly from the command line.

Installation

Install from PyPI:

pip install dabih

Or install in editable mode:

After cloning this library, you can install the dabih python package via:

pip install -e .

Set Up Guide

Create a folder named dabih at either ~/.config (create ~/.config if necessary) or at your default XDG_CONFIG_HOME location. In the dabih folder, create a config.yaml file with the following format:

base_url: "http://localhost:3000"
token: "your token"

Save any dabih private keys (.pem files) in that dabih folder as well. The .pem files should have 'dabih' at some point in their file name or they won't be recognised as dabih private keys.

After completing the setup, run:

dabih check

to test for URL, token and key-files being valid.

Example usage:

To see all available commands and options:

dabih

Example for uploading or downloading a file:

dabih upload <path_to_file>
dabih upload <path_to_file> <target_folder_mnemonic>
dabih download <mnemonic>
dabih download <mnemonic> <path_to_target_folder>

If no target folder is specified upon upload, the file will be saved in your dabih home directory. If no target folder is specified upon download, the file will be saved in your current directory.

For additional help, use --help, e.g.:

dabih download --help

For debugging, use -v, e.g.:

dabih -v token-info

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

dabih-1.0.2.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

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

dabih-1.0.2-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

Details for the file dabih-1.0.2.tar.gz.

File metadata

  • Download URL: dabih-1.0.2.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dabih-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5d50d88f375dcadc548b5f4f889a35c2ec6e0afc21400ebef104051426e27d9a
MD5 83ccc4c73b677496a48a7b2fbafcbf0b
BLAKE2b-256 d852c27f376e1df2e0ffdde9c0031a05b0f68794db097a03e286afbe843cc1f3

See more details on using hashes here.

File details

Details for the file dabih-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: dabih-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 100.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dabih-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5dfcebe9f9a0054ae6fd853e929aa75e6dfa3ed895cef9c5f98b4ccc76678bbb
MD5 e31cf7d893b88dbd5306c71fc52daa2a
BLAKE2b-256 846c8cc47b90eca4d0f184bae35145e2339a7590508a42db01c46b5173249f65

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