This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import json | |
| from typing import Dict | |
| # ==== CONFIGURATION ==== | |
| CLIENT_ID = '####' | |
| CLIENT_SECRET = '####' | |
| REFRESH_TOKEN = '####' | |
| FOLDER_ID = '####' | |
| UPLOAD_FILE = 'my-upload-test.zip' # Change this to your file |
When running FastAPI app, all the logs in console are from Uvicorn and they do not have timestamp and other useful information. As Uvicorn applies python logging module, we can override Uvicorn logging formatter by applying a new logging configuration.
Meanwhile, it's able to unify the your endpoints logging with the Uvicorn logging by configuring all of them in the config file log_conf.yaml.
Before overriding:
uvicorn main:app --reload