Browse Source

Init bottle app

master
Lucas Verney 7 years ago
parent
commit
a4e3538102
  1. 4
      fetch_references.py
  2. 31
      main.py
  3. 3
      requirements.txt

4
fetch_references.py

@ -3,8 +3,8 @@ import os @@ -3,8 +3,8 @@ import os
import sys
# Local import
from ..reference_fetcher import arxiv
from ..reference_fetcher import bbl
from reference_fetcher import arxiv
from reference_fetcher import bbl
if __name__ == "__main__":

31
main.py

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
#!/usr/bin/env python3
from bottle import get, post, run
from bottle.ext import sqlalchemy
from sqlalchemy import create_engine, Column, Integer, Sequence, String
from sqlalchemy.ext.declarative import declarative_base
@get("/doi/<doi:path>")
def doi(doi):
"""
GET /doi/<DOI>
{}
"""
# TODO
pass
@post("/doi/<doi:path>")
def doi_post(doi):
"""
POST /doi/<DOI>
{}
"""
# TODO
pass
if __name__ == "__main__":
run(host='localhost', port=8080, debug=True)

3
requirements.txt

@ -1 +1,4 @@ @@ -1 +1,4 @@
requests>=2.4.2
sqlalchemy>=1.0.10
bottle>=0.12.9
bottle-sqlalchemy>=0.4.3

Loading…
Cancel
Save