CADC VOS Class Libraries
Project description
vos is a set of python modules and scripts that ease access to VOSpace.
The default installation of vos is tuned for accessing the VOSpace provided by the Canadian Advanced Network For Astronomical Research (CANFAR)
VOSpace is a Distributed Cloud storage service for use in Astronomy.
There are two ways to use vos:
access VOSpace using the command-line script: eg. vcp
use the vos module inside a Python script: import vos
Authentication to the CANFAR VOSpace service is performed using X509 security certificates, header tokens or username/password pairs. The authentication system is managed by the CADC Group Management Service (GMS).
To retrieve an X509 security certificate for use with the vos tools use the cadc-get-cert script included with this package.
Additional information is available in the CANFAR documentation
System Requirments
A CANFAR VOSpace account (required for WRITE access, READ access can be anonymous)
python3.7 or later
Installation
vos is distributed via PyPI/vos and PyPI is the most direct way to get the latest stable release:
pip install vos --upgrade --user
Or, you can retrieve the github distribution and use
python setup.py install --user
Tutorial
Get a CANFAR account
Install the vos package.
Retrieve a X509/SSL certificate using the cadc-get-cert script installed as part of the cadcutils package that is automatically installed wiht vos.
Example Usage.
Commandline usage:
vls -l vos: [List a vospace]
vcp vos:jkavelaars/test.txt ./ [copies test.txt to the local directory from vospace]
vchmod g+q vos:VOSPACE/foo/bar.txt 'GROUP1, GROUP2, GROUP3' to give three user GROUPs permission to write to this file.
vmkdir --help [get a list of command line options and arguments]
vmkdir, vrm, vrmdir, vsync vcat, vchmod and vln
The complete list of vos commmand line tools can be found using pydoc vos.commands
In a Python script (the example below provides a listing of a vospace container)
#!python import vos client = vos.Client() client.listdir('vos:jkavelaars')
Integration Tests
The integration tests are, at present, designed to run only with the CADC VOSpace and test accounts credentials. Tests assume that vos and/or vofs packages have been installed.
Run the tests:
$ ./test/scripts/vospace-all.tcsh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vos-3.6.1.1.tar.gz
.
File metadata
- Download URL: vos-3.6.1.1.tar.gz
- Upload date:
- Size: 103.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c05ca2fd6149fc563d41de46e28824a55e944e449e7e08c954d20df754c8474b |
|
MD5 | 092a2379d103ae4eded272a4797a7581 |
|
BLAKE2b-256 | ac8acb4304e31d08b6fce39b3eaa3ec671488627e161bb672bab09f533d97b53 |
Provenance
File details
Details for the file vos-3.6.1.1-py3-none-any.whl
.
File metadata
- Download URL: vos-3.6.1.1-py3-none-any.whl
- Upload date:
- Size: 153.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cfe57d41f8a275c61c6c643b5ec60e07dc446c9cabd8d83e34b8a46d0eea86d |
|
MD5 | 0486e2c0bd29c82c18248f130fb53fb9 |
|
BLAKE2b-256 | 2402aa854ea77f4f706abc7833a8b9967ea816cfa0f3e0b942bdd2ca7c07e9aa |