Best Flask open-source libraries and packages

MotherWeatherNewsServer

MotherWeatherNews server
Updated 1 year ago

MotherWeatherNewsServer

MotherWeatherNews server

Environments

  • Python3.6

How to set up

  • Google CloudのCloud Natural Language APIに登録し、サービスアカウントキー(json)を/config/credential.jsonに置く
  • サービスアカウントキーが置いてある場所のpathをGOOGLE_APPLICATION_CREDENTIALSに入れる
  • Azureに登録し、Azure Face APIのAPIキーをAZURE_FACE_API_SUBSCRIPTION_KEYに入れる
  • FireBaseに登録し,server Keyを FIREBASE_SERVER_KEYに入れる
  • FireBaesに登録し,発火させたいクライアントの登録トークンを DEVICE_REGISTER_TOKENに入れる
  • pip3 install -r requirements.txt
  • ./init.sh

How to set up for IBM Cloud

  • 環境変数MOTHER_WEATHER_NEWS_SERVER_BLUEMIX_APP_NAMEにアプリの名前を入れる
  • 以下のコマンドを実行する
bluemix cf set-env $MOTHER_WEATHER_NEWS_SERVER_BLUEMIX_APP_NAME AZURE_FACE_API_SUBSCRIPTION_KEY $AZURE_FACE_API_SUBSCRIPTION_KEY
bluemix cf set-env $MOTHER_WEATHER_NEWS_SERVER_BLUEMIX_APP_NAME GOOGLE_APPLICATION_CREDENTIALS "/home/vcap/app/config/credential.json"
bluemix cf set-env $MOTHER_WEATHER_NEWS_SERVER_BLUEMIX_APP_NAME FIREBASE_SERVER_KEY $FIREBASE_SERVER_KEY
bluemix cf set-env $MOTHER_WEATHER_NEWS_SERVER_BLUEMIX_APP_NAME DEVICE_REGISTER_TOKEN $DEVICE_REGISTER_TOKEN

How to up server in local

  • python3 app.py
  • access to http://localhost:8080

How to deploy

./deploy.sh

Tags server python