README.md 940 Bytes
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
# CSST DFS APIs library

## Introduction

Wei Shoulin's avatar
Wei Shoulin committed
5
This package provides APIs to access CSST's files and databases.
Wei Shoulin's avatar
Wei Shoulin committed
6
7
8

## Installation

Wei Shoulin's avatar
brick    
Wei Shoulin committed
9
`csst-dfs-api` can be installed with the following command:
Wei Shoulin's avatar
Wei Shoulin committed
10
11

```bash
Wei Shoulin's avatar
level2    
Wei Shoulin committed
12
git clone https://csst-tb.bao.ac.cn/code/csst-dfs/csst-dfs-api.git
Wei Shoulin's avatar
ephem    
Wei Shoulin committed
13
cd csst-dfs-api
Wei Shoulin's avatar
Wei Shoulin committed
14
pip install .
Wei Shoulin's avatar
Wei Shoulin committed
15
16
```

Wei Shoulin's avatar
Wei Shoulin committed
17
18
19
`csst-dfs-api` and relevant packages could be installed by running one of the following commands in your terminal.

```bash
Wei Shoulin's avatar
Wei Shoulin committed
20
sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-dfs/csst-dfs-api/-/raw/main/tools/csst-dfs-api-install.sh)"
Wei Shoulin's avatar
Wei Shoulin committed
21
```
Wei Shoulin's avatar
brick    
Wei Shoulin committed
22

Wei Shoulin's avatar
Wei Shoulin committed
23
24
25
## Configuration

enviroment variables
Wei Shoulin's avatar
brick    
Wei Shoulin committed
26

Wei Shoulin's avatar
ephem    
Wei Shoulin committed
27
28
- CSST_DFS_API_MODE = local or cluster               # default: local
- CSST_LOCAL_FILE_ROOT = [a local file directory]    # required if DFS_API_MODE = local,  default: /opt/temp/csst
Wei Shoulin's avatar
level2    
Wei Shoulin committed
29
- CSST_DFS_GATEWAY = [gateway server's address]      # required if DFS_API_MODE = cluster
Wei Shoulin's avatar
Wei Shoulin committed
30
31
- CSST_DFS_APP_ID = test      # required
- CSST_DFS_APP_TOKEN = test      # required