Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

CADC VOS Class Libraries

Project Description
DOCUMENTATION
=============

.. image:: https://img.shields.io/pypi/v/vos.svg
:target: https://pypi.python.org/pypi/vos

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 <http://www.canfar.net/>`__ (CANFAR)

VOSpace is a Distributed Cloud storage service for use in Astronomy.

There are two ways to use vos:

1. access VOSpace using the command-line script: eg. *vcp*
2. 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 *getCert* script included with this package.

Additional information is available in the `CANFAR
documentation <http://www.canfar.net/docs/vospace/>`__

System Requirments
------------------

- A CANFAR VOSpace account (required for WRITE access, READ access can
be anonymous)
- fuse OR OSX-FUSE (see additional documentation, only required for
filesystem based access, not for command line or programmatic)
- python2.6 or later

Installation
------------

vos is distributed via `PyPI/vos <pypi.python.org/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 <github.com/canfar/vos>`__ distribution
and use

``python setup.py install --user``

Tutorial
--------

1. Get a `CANFAR
account <http://www.canfar.phys.uvic.ca/canfar/auth/request.html>`__
2. Install the vos package.
3. Retrieve a X509/SSL certificate using the ``getCert``
script installed as part of the ``cadcutils`` package that is automatically installed wiht vos.
4. Example Usage.

1. 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``

2. In a Python script (the example below provides a listing of a
vospace container)

::

#!python
import vos
client = vos.Client()
client.listdir('vos:jkavelaars')

Development
-----------

A virtual environment (**venv**) is recommended to set up external
dependencies without installing them system-wide. Following `these
instructions <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`__,
install **virtualenv**:

::

$ pip install virtualenv

Next, create, and activate a local **venv** (this example uses
**bash**):

::

$ virtualenv venv
$ source venv/bin/activate


Setup the new development environment for testing by installing the appropriate packages:

::

$ pip install -r dev_requirements.txt

The test environment is built into the *setup.py* so that conducting unit-tests can be achieved like so:

::

$ python setup.py test

If you would like versbose output formated as a web page, for example,
you can add options to the test call:

::

$ python setup.py test --addopts '--cov-report html:cov_html --cov=vos'

The same option attribute can be used to pass other arguments to py.test
that is executing the test. To run specific only tests for example:

::

$ python setup.py test --addopts 'vos/test/Test_vos.py::TestClient::test_transfer_error'

Each time you resume work on the project and want to use the **venv**
(e.g., from a new shell), simply re-activate it:

::

$ source venv/bin/activate

When done, just issue a

::

$ deactivate

command to deactivate the virtual environment.

Integration Tests
~~~~~~~~~~~~~~~~~

The integration tests are, at present, designed to run only with the
CADC VOSpace. Tests assume that vos and/or vofs packages have been
installed.

Activate the **venv** and install vos

::

$ source venv/bin/activate.csh
$ pip install vos

Run the tests:

$ ./test/scripts/vospace-all.tcsh
Release History

Release History

This version
History Node

3.0.2

History Node

3.0.1

History Node

3.0.0

History Node

3.0

History Node

3.0.0b6

History Node

3.0.0b5

History Node

3.0.0b4

History Node

3.0.0b3

History Node

3.0.0b2

History Node

3.0.0b1

History Node

2.3.11a3

History Node

2.3.11a2

History Node

2.3.11a1

History Node

2.3.11a0

History Node

2.3.10

History Node

2.3.9

History Node

2.3.8

History Node

2.3.7

History Node

2.3.6

History Node

2.3.5

History Node

2.3.4

History Node

2.3.3

History Node

2.3.3rc0

History Node

2.3.3b0

History Node

2.3.3a0

History Node

2.3.2

History Node

2.3.1

History Node

2.3.0

History Node

2.3a0

History Node

2.3.0a0

History Node

2.2.5

History Node

2.2.4

History Node

2.2.3

History Node

2.2.2

History Node

2.2.1

History Node

2.2.1a0

History Node

2.2.0

History Node

2.1.8

History Node

2.1.7

History Node

2.1.6

History Node

2.1.5

History Node

2.1.4

History Node

2.1.3

History Node

2.1.2

History Node

2.1.2.a

History Node

2.1.1b0

History Node

2.1.1a0

History Node

2.1

History Node

2.0.rc3

History Node

2.0.rc2

History Node

1.12.5

History Node

1.12.4

History Node

1.12.3

History Node

1.12.2

History Node

1.11.3

History Node

1.11.2

History Node

1.11.1

History Node

1.11.0

History Node

1.10.5

History Node

1.10.4

History Node

1.10.3

History Node

1.10.2

History Node

1.9.11c

History Node

1.9.11a

History Node

1.9.10

History Node

1.9.9

History Node

1.9.8a

History Node

1.9.7

History Node

1.9.6

History Node

1.9.5

History Node

1.9.4b

History Node

1.9.4a

History Node

1.9.3b

History Node

1.9.3a

History Node

1.9.2

History Node

1.9.1a

History Node

1.9.0b

History Node

1.9.0a

History Node

1.8.1

History Node

1.8.0

History Node

1.7.1

History Node

1.7.0a

History Node

1.6.7a

History Node

1.6.6a1

History Node

1.6.5

History Node

1.6.5c

History Node

1.6.5b

History Node

1.6.4a8

History Node

1.6.4a7

History Node

1.6.4a6

History Node

1.6.4a5

History Node

1.6.4a4

History Node

1.6.4a3

History Node

1.6.4a2

History Node

1.6.4a1

History Node

1.6.3

History Node

1.6.2

History Node

1.6.1

History Node

1.6.0

History Node

1.5.9

History Node

1.5.8

History Node

1.5.7

History Node

1.5.6

History Node

1.5.5

History Node

1.5.4

History Node

1.5.3

History Node

1.5.2

History Node

1.5.1

History Node

1.5.0

History Node

1.4.11

History Node

1.4.10

History Node

1.4.8

History Node

1.4.7

History Node

1.4.6

History Node

1.4.5

History Node

1.4.4

History Node

1.4.3

History Node

1.4.2

History Node

1.4.1

History Node

1.4.0

History Node

1.3.8

History Node

1.3.7

History Node

1.3.6

History Node

1.3.5

History Node

1.3.4

History Node

1.3.3

History Node

1.3.2

History Node

1.3.1

History Node

1.2.2

History Node

1.2.1a

History Node

1.9.11g

History Node

1.9.11e

History Node

1.9.11d

History Node

1.6.7f

History Node

1.6.7e

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
vos-3.0.2.tar.gz (53.5 kB) Copy SHA256 Checksum SHA256 Source Sep 18, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting