https://github.com/quanted/nta_flask
Flask restful API for the nta_app backend
https://github.com/quanted/nta_flask
Last synced: 5 months ago
JSON representation
Flask restful API for the nta_app backend
- Host: GitHub
- URL: https://github.com/quanted/nta_flask
- Owner: quanted
- Created: 2019-06-04T13:47:50.000Z (about 7 years ago)
- Default Branch: dev
- Last Pushed: 2025-05-07T18:06:07.000Z (about 1 year ago)
- Last Synced: 2025-05-07T19:23:05.748Z (about 1 year ago)
- Language: Python
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nta_flask
Flask restful API for the nta_app backend
This app is normally deployed as a submodule using docker-compose or kubernetes
with the full QED application available at https://github.com/quanted/qed
# Development Deployment
For development purposes it can be deployed locally from the home directory of this repo by
changing line 14 of flask_nta.py to import '**dsstox_rest**' rather than '**nta_flask.dsstox_rest**'
To deploy locally, run the following commands from the top directory in the repo
$ export FLASK_APP=flask_nta.py
$ flask run
The application will come up on http://127.0.0.1:5000/. To test the application, POST the
following request to http://127.0.0.1:5000/rest/ms1/batch/1
{
"search_by":"mass",
"query": [
500,
600
],
"accuracy":1
}
# Data Configuration
In order for the service to be used, a database must be initialized. For more on database initialization,
please review the markdown in _database/DATA_INITIALIZATION.md_.
To config the application for connection to the database, the following environment variables must be defined:
POSTGRES_USER, AURORA_PW, POSTGRES_HOST, POSTGRES_DB