21388: Update deb instructions in Python READMEs
[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 and Ubuntu systems
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52 Arvados publishes packages for Debian 11 "bullseye," Debian 12 "bookworm," Ubuntu 20.04 "focal," and Ubuntu 22.04 "jammy." You can install the Python SDK package on any of these distributions by running the following commands::
53
54   sudo install -d /etc/apt/keyrings
55   sudo curl -fsSL -o /etc/apt/keyrings/arvados.asc https://apt.arvados.org/pubkey.gpg
56   sudo tee /etc/apt/sources.list.d/arvados.sources >/dev/null <<EOF
57   Types: deb
58   URIs: https://apt.arvados.org/$(lsb_release -cs)
59   Suites: $(lsb_release -cs)
60   Components: main
61   Signed-by: /etc/apt/keyrings/arvados.asc
62   EOF
63   sudo apt update
64   sudo apt install python3-arvados-python-client
65
66 Configuration
67 -------------
68
69 This client software needs two pieces of information to connect to
70 Arvados: the DNS name of the API server, and an API authorization
71 token. `The Arvados user
72 documentation
73 <http://doc.arvados.org/user/reference/api-tokens.html>`_ describes
74 how to find this information in the Arvados Workbench, and install it
75 on your system.
76
77 Testing and Development
78 -----------------------
79
80 This package is one part of the Arvados source package, and it has
81 integration tests to check interoperability with other Arvados
82 components.  Our `hacking guide
83 <https://dev.arvados.org/projects/arvados/wiki/Hacking_Python_SDK>`_
84 describes how to set up a development environment and run tests.