Skip to content

Commit

Permalink
[feat] set up flask backend and api routes to trigger webscraper data…
Browse files Browse the repository at this point in the history
…base actions
  • Loading branch information
deenasun committed Nov 22, 2024
1 parent 29f0433 commit 696dba5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 51 deletions.
30 changes: 30 additions & 0 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,35 @@ async def run_nyserda_large():
return {"message": "Hello NYSERDA Large"}


@app.route("/api/nyserda_solar", methods=["GET"])
async def run_nyserda_solar():
nyserda_solar_to_database()
return {"message": "Helo NYSERDA Solar"}


@app.route("/api/nyiso", methods=["GET"])
async def run_nyiso():
nyiso_to_database()
return {"message": "Hello NYISO"}


@app.route("/api/ores_noi", methods=["GET"])
async def run_ores_noi():
ores_noi_to_database()
return {"message": "Hello ORES NOI"}


@app.route("/api/ores_under_review", methods=["GET"])
async def run_ores_under_review():
ores_under_review_to_database()
return {"message": "Hello ORES Under Review"}


@app.route("/api/ores_permitted", methods=["GET"])
async def run_ores_permitted():
ores_permitted_to_database()
return {"message": "Hello ORES Permitted"}


if __name__ == "__main__":
app.run(port=5328, debug=True)
2 changes: 1 addition & 1 deletion api/webscraper/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ def ores_permitted_to_database() -> None:
"""
For testing
"""
nyserda_large_to_database()
# nyserda_large_to_database()
# nyserda_solar_to_database()
# nyiso_to_database()
# ores_noi_to_database()
Expand Down
50 changes: 0 additions & 50 deletions api/webscraper/server.py

This file was deleted.

0 comments on commit 696dba5

Please sign in to comment.