https://github.com/simonsobs/ucscradiometer-server
Flask API for UCSC Radiometer
https://github.com/simonsobs/ucscradiometer-server
Last synced: 8 months ago
JSON representation
Flask API for UCSC Radiometer
- Host: GitHub
- URL: https://github.com/simonsobs/ucscradiometer-server
- Owner: simonsobs
- License: bsd-2-clause
- Created: 2023-08-22T13:28:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-28T20:22:50.000Z (almost 3 years ago)
- Last Synced: 2024-12-27T04:25:38.440Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Flask API for UCSC Radiometer
=======
A small Flask app for serving the latest PWV values from text file.
This app is built to server the files from the UCSC server, and relies on the
current output format and naming conventions in place. If those get change this
will need updating.
Dependencies
------------
There are a couple of python modules we need:
* flask
* gunicorn
Running the App
---------------
The app needs to know where to get the data. You can config this by setting the
``PWV_DATA_DIR`` environment variable. We then run the app with gunicorn.
This gunicorn configuration file and `pwv_web` python script is provided
in the `api` directory in this repo.
```bash
$ export PWV_DATA_DIR=/path/to/data/
$ gunicorn -c gunicorn.conf.py pwv_web:app
```
You can then navigate to http://127.0.0.1:5000 to view the latest PWV value and
timestamp.