Skip to main content

Client library and command line tool for the Near Line Data Store (NLDS).

Project description

CEDA Near-Line Data Store Client

For more information please see the documentation.

This is the client used for interacting with the CEDA Near-Line Data Store (NLDS).

It consists of a library part (clientlib) and a command line client (nlds_client.py)

NLDS client is built upon Requests and Click

NLDS client requires Python 3.10 or greater. It has been tested with Python 3.10, 3.11 and 3.12.

Installation

To install directly from the GitHub repository.

  1. Create a python virtual environment:

    python3 -m venv ~/nlds-client
    
  2. Activate your new virtual environment:

    source ~/nlds-client/bin/activate
    
  3. Install the nlds-client package directly from this github repo:

    pip install git+https://github.com/cedadev/nlds-client.git
    

To install from PyPi (v1.0.13 and newer).

  1. Create a python virtual environment:

    python3 -m venv ~/nlds-client
    
  2. Activate your new virtual environment:

    source ~/nlds-client/bin/activate
    
  3. Install the nlds-client package from PyPi:

    pip install nlds-client
    

If installing this repository for development we recommend you install with the editable flag (-e).

Config

NLDS client requires a config file in the user's home directory: ~/.nlds-config. This file contains information about the JASMIN infrastructure and so is not included in the GitHub repository. A Jinja-2 template is included in the nlds_client/templates/nlds-config.j2 file.

This config file requires information about the JASMIN OAuth2 authentication server, including the oauth_client_id, oauth_client_secret and various URLs. These can be populated by using the command

nlds init

This will need to be pointed at an appropriate NLDS server url but will default to the one hosted on JASMIN - see the relevant section of the docs for more details.

When the NLDS client is first used, the user will be prompted to enter their username and password. This is the username and password for the JASMIN accounts portal. The token is stored at a location defined in the ~/.nlds-config file with the key oauth_token_file_location.

To use the NLDS you will also need to provide a token and secret_key to access the object store you would like to use as an NLDS cache. Details for how to do this are in the documentation.

Usage

Upon installation, an alias for the NLDS client is created: nlds. This can be used to PUT and GET files and filelists to and from an NLDS server, as well as a whole host of other commands. See the documentation for an extensive tutorial. A reference of all available commands is also available.

Tests

Automatic unit-testing is run with pytest, to manually run the tests for a local development environment, first ensure the appropriate version of pytest is installed in your venv. From the root of the repository, run:

pip install -r tests/requirements.txt

and then, similarly from the root of the repo, run the tests with:

pytest

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

nlds_client-1.0.15.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

nlds_client-1.0.15-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file nlds_client-1.0.15.tar.gz.

File metadata

  • Download URL: nlds_client-1.0.15.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for nlds_client-1.0.15.tar.gz
Algorithm Hash digest
SHA256 af478156da7439c565aeefeae753a44ca95f51745d499b11ccd695d46cee40da
MD5 ea31365bcaff11af362dfd4dc4305007
BLAKE2b-256 92720b4152d1c16087022ced7df9afc415f3b7309e05b0462841f1f6c682e839

See more details on using hashes here.

File details

Details for the file nlds_client-1.0.15-py3-none-any.whl.

File metadata

  • Download URL: nlds_client-1.0.15-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for nlds_client-1.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 4dd4e95b9606067424b836cc04061f0731afcbd205c07af6f1e6fe1798d49354
MD5 411d66d96eaf074bd555920c35b3ad3d
BLAKE2b-256 3fa2f8e466b1edebe9098c1feedd4c2f33e0e95f52f1b7dd15eec0cc63c5a9af

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