Merge branch 'main' from workbench2.git
[arvados.git] / sdk / python / README.rst
1 .. Copyright (C) The Arvados Authors. All rights reserved.
2 ..
3 .. SPDX-License-Identifier: Apache-2.0
4
5 =====================
6 Arvados Python Client
7 =====================
8
9 Overview
10 --------
11
12 This package provides the ``arvados`` module, an API client for
13 Arvados_.  It also includes higher-level functions to help you write
14 Crunch scripts, and command-line tools to store and retrieve data in
15 the Keep storage server.
16
17 .. _Arvados: https://arvados.org/
18
19 Installation
20 ------------
21
22 Installing under your user account
23 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
25 This method lets you install the package without root access.  However,
26 other users on the same system will need to reconfigure their shell in order
27 to be able to use it. Run the following to install the package in an
28 environment at ``~/arvclients``::
29
30   python3 -m venv ~/arvclients
31   ~/arvclients/bin/pip install arvados-python-client
32
33 Command line tools will be installed under ``~/arvclients/bin``. You can
34 test one by running::
35
36   ~/arvclients/bin/arv-get --version
37
38 You can run these tools by specifying the full path every time, or you can
39 add the directory to your shell's search path by running::
40
41   export PATH="$PATH:$HOME/arvclients/bin"
42
43 You can make this search path change permanent by adding this command to
44 your shell's configuration, for example ``~/.bashrc`` if you're using bash.
45 You can test the change by running::
46
47   arv-get --version
48
49 Installing on Debian systems
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52 1. Add this Arvados repository to your sources list::
53
54      deb http://apt.arvados.org/ buster main
55
56 2. Update your package list.
57
58 3. Install the ``python3-arvados-python-client`` package.
59
60 Configuration
61 -------------
62
63 This client software needs two pieces of information to connect to
64 Arvados: the DNS name of the API server, and an API authorization
65 token.  You can set these in environment variables, or the file
66 ``$HOME/.config/arvados/settings.conf``.  `The Arvados user
67 documentation
68 <http://doc.arvados.org/user/reference/api-tokens.html>`_ describes
69 how to find this information in the Arvados Workbench, and install it
70 on your system.
71
72 Testing and Development
73 -----------------------
74
75 This package is one part of the Arvados source package, and it has
76 integration tests to check interoperability with other Arvados
77 components.  Our `hacking guide
78 <https://dev.arvados.org/projects/arvados/wiki/Hacking_Python_SDK>`_
79 describes how to set up a development environment and run tests.