Flaskのプロジェクトでテストを書いていたら、なぜかタイトルのエラーが発生 問題点は各ディレクトリに __init__.py ファイルがないことで、各ディレクトリに追加することで解消できました! こちら参考画像 参考記 …
カテゴリーアーカイブ: FastAPI
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 171 (char 170)
strictをFalseにしたら解決できました 参考記事 python で json.loads() したときに 特定の制御文字列が入ってるとJSONDecodeErrorが返ってくる
CircleCIでfirebaseのkeyを使う方法
e2eテストでfirebase authをcircleci上で再現したく、なかなか苦労したのでメモに残しておきます circleciの環境変数にkeyとvalueを追加 valueはbase64にエンコード 私はここを使 …
FastAPI usersのasyncテストの参考記事
https://github.com/tiangolo/fastapi/issues/1273 https://fastapi.tiangolo.com/advanced/async-tests/ https://git …
FastAPIでメール送信
参考記事 fastapi-mail
fast api usersを導入する際参考になった記事
Getting Started with FastAPI-Users and Alembic
FastAPIでCORSの対応
参考記事 FastAPIでCORSを回避
FastAPIでalembicのautogenerationを適用する方法
とりあえずproject/alembic/env.py の中身 sqlalchemyのmodelを継承して作成したmodelのファイルをimportして設定してあげることが必要なので、下記のようにpathを繋げてあげる。 …
FastAPI/security raise TypeError(“Unicode-objects must be encoded before hashing”)
FastAPIのOAuthのチュートリアルに従いながらコード実装していたところタイトルのエラー発生 とかを試したけど、一向にエラーが治らなかったので、pythonのバージョンを思い切って3.8 -> 3.6.5に落 …
“FastAPI/security raise TypeError(“Unicode-objects must be encoded before hashing”)” の続きを読む