<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Phoca</author_name>
  <author_url>https://blog.hatena.ne.jp/Phoca/</author_url>
  <blog_title>skydum</blog_title>
  <blog_url>https://skydum.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>SQLAlchemy</anon>
  </categories>
  <description>FastAPI + SQLAlchemyでscoped_sessionを使うとエラーが発生する 発生した環境は以下 Python 3.8.10 SQLAlchemy 2.0.18 fastapi 0.99.1 エラー内容 FastAPIを使っていてSQLAlchemyでDBにアクセスを連続で行ったときに以下のようなエラーが発生することがある。 File &quot;./fastapi-session-test/.venv/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 926, in _raise_for_prerequisite…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fskydum.hatenablog.com%2Fentry%2F2023%2F07%2F08%2F230110&quot; title=&quot;FastAPI + SQLAlchemyでscoped_sessionを使うとエラーが発生する - skydum&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-07-08 23:01:10</published>
  <title>FastAPI + SQLAlchemyでscoped_sessionを使うとエラーが発生する</title>
  <type>rich</type>
  <url>https://skydum.hatenablog.com/entry/2023/07/08/230110</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
