• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
yjyoon / 대옹_불량율분석 star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
대옹_불량율분석action.py
Download as .zip file
File name
Commit message
Commit date
data
added DB functionality welding DB is complete
2023-10-17
database
DB dump added
2023-10-17
tools
added DB functionality welding DB is complete
2023-10-17
README.md
Hello Yona
2023-08-30
action.py
building apis
2023-09-01
app.py
Fixed bugs : one that format of new weather datas are not matching the existing one
2023-09-26
auth.py
building apis
2023-09-01
main.py
Hello Yona
2023-08-30
juni 2023-09-01 e4f5969 building apis UNIX
Raw Open in browser Change history
import sched from flask_restx import Resource, Api, Namespace, fields from flask import request from flask import Flask, render_template, request import pandas as pd Action = Namespace( name="Action", description="노드 분석을 위해 사용하는 api.", ) # @sched.scheduler # def weather_update @Action.route('/forecast') class forecast(Resource): @Action.doc(responses={200: 'Success'}) @Action.doc(responses={500: 'Register Failed'}) def post(self): if request.method == 'GET': df = pd.read_csv("data/weather/weather_data_forecast.csv") humidity = df['forecast'].value[6:] / 6 if humidity > 90: return { 'report': "warn" }, 200 elif humidity <= 90 and humidity > 80: return { 'report': "caution" }, 200 else: return { 'report': "safe" }, 200

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up