Skip to content

Conversation

@jianyuan
Copy link

@jianyuan jianyuan commented Apr 3, 2021

  • Upgrade to SQLAlchemy 1.4, which supports AsyncIO. Full guide here.
  • Convert API endpoints to asyncio.
  • Fix Celery.

Addresses: #315

yield db
finally:
db.close()
async def get_db() -> Generator:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AsyncGenerator?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python-jose = {extras = ["cryptography"], version = "^3.1.0"}
asyncpg = "^0.22.0"
httpx = "^0.17.1"
SQLAlchemy = "^1.4.5"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.4.10 or just ^1.4?

@Andrew-Sheridan
Copy link

@jianyuan This branch is an excellent reference!

@gmos
Copy link

gmos commented May 16, 2021

Missed a couple in the start-up.
async-startups-diff.txt

@jokull
Copy link

jokull commented May 22, 2021

Celery doesn't yet have a way to queue tasks without blocking the asyncio loop or resorting to asgiref.sync_to_async. Maybe it should be skipped for this tutorial? arq would be a better choice.

@AntonOfTheWoods
Copy link

As a warning for others, the sqlalchemy-stubs dev dependency is also not compatible with recent sqlalchemy - you will get errors in editors (vscode at the very least), though it will still run fine.

@jokull
Copy link

jokull commented Jul 17, 2021

As a warning for others, the sqlalchemy-stubs dev dependency is also not compatible with recent sqlalchemy - you will get errors in editors (vscode at the very least), though it will still run fine.

I think it's compatible with SQLAlchemy, but Pyright doesn't make use of sqla mypy extension. If you want VS Code to show SQLAlchemy typing errors you're better off using the mypy extension for VS Code which has gotten better lately. I configured it and it works nicely, but I disabled default typing errors in VS Code.

yelassad pushed a commit to lionswerk/full-stack-fastapi-postgresql that referenced this pull request Mar 30, 2023
@tiangolo
Copy link
Member

tiangolo commented Mar 8, 2024

Thanks @jianyuan! 🙇

I wanted to migrate to SQLModel, it was done in another PR, that is based on SQLAlchemy 2.0. 🎉

So, now I'll close this one, but thanks for all the effort! 🍰

@tiangolo tiangolo closed this Mar 8, 2024
@AntonOfTheWoods
Copy link

AntonOfTheWoods commented Mar 8, 2024

@tiangolo , if you were even remotely grateful for the effort you would have signalled something before 3 YEARS after the PR. I know, you are busy, but there were plenty of people submitting PRs and presumably many who could have spent a little effort to keep things updated without you having to spend time. But no, a single (big name) maintainer who just ghosts everyone and their PRs for YEARS, then comes back as if it were last week...

alejsdev pushed a commit that referenced this pull request Dec 19, 2024
* 🧱 Add failed status for docker builder when it fails

* 🧱 Add support for uv on builder

* 🚚 Rename Dockerfile.uv to Dockerfile.requirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants