readme.rst

changeset 0
a172f26a566a
child 1
783c8a0db76f
equal deleted inserted replaced
-1:000000000000 0:a172f26a566a
1 SCC access script
2 =================
3
4 This small scripts permits interacting with the Single Calculus Chain through
5 the command line. Specifically, with the script you can:
6
7 * Upload a file to the SCC for processing
8 * Download the processed files and graphs
9 * Delete an existing measurement from the SCC (with appropriate privileges)
10
11 The main functions are implemented in a class (SCC) that you can also import
12 and use in your custom scripts.
13
14 The script does not provide any feedback if a file upload fails. Before using
15 the script, you will need to upload some files manually and be confident that
16 your SCC file format and processing settings are correct.
17
18 Please note that this is not part of the "official" SCC tools. I will update
19 it when I have time but I cannot guarantee to maintain it in the long run.
20
21 Any suggestions for improvements and new features are more than welcome.
22
23 Installation
24 ------------
25
26 The only requirement for running this program is the requests python module.
27 If you have pip installed you can install it by::
28
29 pip install requests.
30
31 See http://docs.python-requests.org/en/latest/user/install/ for more details.
32
33
34 Settings
35 --------
36 You will need to change some user-defined settings in a settings.py file. You
37 can rename the settings.sample.py file to settings.py and follow the instructions
38 there.
39
40 Specifically, you will need to:
41
42 1. Change the BASIC_LOGIN and DJANGO_LOGIN to your credentials.
43 2. Change the OUTPUT_DIR to the location were the results will be stored.
44
45 Please not that it's not a good idea to store your own credentials in the settings
46 file. The standard user has "Station Management" privileges and if the credentials
47 are stolen, someone could change/delete the stations settings from the SCC database.
48 For this, it is better to use a used account with minimum access settings, that
49 can only upload files and measurements.
50
51
52 Usage
53 -----
54
55 You can upload a file specifying the username and the system id::
56
57 python scc_access.py 20110101po01.nc 125
58
59 If you want to wait for the processing to finish and download the resulting files
60 you need to define the -p flag::
61
62 python scc_access.py 20110101po01.nc 125 -p
63
64 If you want to delete an existing measurement id from the database use the -d flag and
65 the measurement id::
66
67 python scc_access.py -d 20110101po01
68
69 For more information on the syntax type::
70
71 python scc_access.py -h

mercurial