Asyncpg
Aquesta pàgina encara no s'ha traduït — es mostra en l'idioma original:English
Introduction
You’ll build an asynchronous product management API and leverage FastAPI’s async capabilities and connection pools to efficiently manage database connections, ensuring your API can scale and handle high traffic with ease.
.env
We don’t need python-dotenv, use uv run with --env-file, and your env vars from .env get loaded.
For example, if we’ve got a FastAPI project we can run it locally with env vars like:
uv run --env-file .env fastapi devYou can specific different env files for different environments, like .env.dev, .env.prod, etc.
uv run --env-file .env.dev fastapi devProduct Management API
Create database product ( asyncpg)
uv run --env-file .env src/main.pyPending
Estàs llegint una vista prèvia.
Inicia sessió amb Google per llegir la pàgina completa. Un compte de Google inclou 5 pàgines gratuïtes en total; l'alumnat i el professorat llegeixen les pàgines del seu curs sense límit.
Inicia sessió