A Python RESTful web service inteface for accessing data in an ODM2 database via Django rest swagger APIs.
NOTE: Currently this repository is under heavy development, a working version is not guaranteed at any point. We will start creating tagged releases soon; once available, please use the latest tagged release for stability.
-
Clone both ODM2PythonAPI repository and ODM2RESTfulWebServices repository.
$ git clone https://github.com/ODM2/ODM2RESTfulWebServices.git odm2restapi $ git clone https://github.com/ODM2/ODM2PythonAPI.git odm2pythonapi
-
Create a new conda environment from the
odm2restapi
environment file.$ cd odm2restapi/ $ git checkout odm2rest_1_0 # This is the development branch, all PR's must merge to here! $ conda env create --file environment.yml
-
Install
odm2pythonapi
master into the environment$ source activate odm2restenv $ pip install -e ../odm2pythonapi/ # Assuming you're still under odm2restapi folder
-
Install
npm
andnodejs
, which will be used to install the swagger editor. -
Get swagger editor for a nice interface and syntax checking when editing the swagger yaml file.
$ cd odm2restapi/ $ npm init -y $ sudo npm install -g swagger $ swagger project edit # This will open a new browser
The first version of the ODM2 RESTful API was developed in late 2015 and early 2016 as a prototype. That legacy code base is no longer used, and the current code base was developed from scratch (though guided by some lessons learned). The legacy code has been archived at the odm2rest_legacy branch. See also relevant discussions on that branch and subsequent architectural decisions at issue 11.
This work was supported by National Science Foundation Grants EAR-1224638 and ACI-1339834. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.