fastapi
databases
Our great sponsors
fastapi | databases | |
---|---|---|
462 | 15 | |
70,541 | 3,692 | |
- | 1.0% | |
9.7 | 6.1 | |
5 days ago | 9 days ago | |
Python | Python | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fastapi
-
LangChain, Python, and Heroku
An API application framework (such as FastAPI)
-
Litestar ā powerful, flexible, and highly performant Python ASGI framework
Itās been my experience that async Python frameworks tend to turn IO bound problems into CPU bound problems with a high enough request rate, because due to their nature they act as unbounded queues.
This ends up made worse if youāre using sync routes.
If youāre constrained on a resource such as a database connection pool, your framework will continue to pull http requests off the wire that a sane client will cancel and retry due to timeouts because it takes too long to get a connection out of the pool. Since there isnāt a straightforward way to cancel the execution of a route handler in every Python http framework Iāve seen exhibit this problem, the problem quickly snowballs.
This is an issue with fastapi, too- https://github.com/tiangolo/fastapi/issues/5759
-
AI-Powered Image Search with CLIP, pgvector, and Fast API
Fast API.
- Ask HN: What is your go-to stack for the web?
-
Fun with Avatars: Crafting the core engine | Part. 1
We will create our API using FastAPI, a modern high-performance web framework for building fast APIs with Python. It is designed to be easy to use, efficient, and highly scalable. Some key features of FastAPI include:
-
Building Fast APIs with FastAPI: A Comprehensive Guide
FastAPI is a modern, fast, web framework for building APIs with Python 3.7+ based on standard Python type hints. It is designed to be easy to use, fast to run, and secure. In this blog post, weāll explore the key features of FastAPI and walk through the process of creating a simple API using this powerful framework.
-
Effortless API Documentation: Accelerating Development with FastAPI, Swagger, and ReDoc
FastAPI is a modern, fast web framework for building APIs with Python 3.7+ that automatically generates OpenAPI and JSON Schema documentation. While FastAPI simplifies API development, manually creating and updating API documentation can still be a time-consuming task. In this blog post, weāll explore how to leverage FastAPIās automatic documentation generation capabilities, specifically focusing on Swagger and ReDoc, and how to streamline the process of documenting your APIs.
-
Building a Dynamic Tile Server Using Cloud Optimized GeoTIFF(COG) with TiTiler
TiTiler is a dynamic tile server built on FastAPI and Rasterio/GDAL. Its main features include support for Cloud Optimized GeoTIFF(COG), multiple projection methods, various output formats (JPEG, JP2, PNG, WEBP, GTIFF, NumpyTile), WMTS, and virtual mosaic. It also provides Lambda and ECS deployment environments using AWS CDK.
-
Writing Clean Code with FastAPI Dependency Injection
To make it a bit more realistic, weāre going to use a FastAPI route as an example, and weāre also going to use FastAPIās dependency injection, which can really help with readability (and testability, but more on that later).
-
š„14 Excellent Open-source Projects for Developersš
2. FastAPI - Turbocharge Your Web APIs with Python ā”
databases
- Whats the standard way for interacting with a DB.
-
Getting Started with Fast-Api šļø and Dockerš³
In the code ,we are using SQLAlchemy as our ORM(Object Relational Mapper) and Databases as our query builder.
-
A Deep Dive into Connecting FastAPI with SingleStore.
MySQL is a powerful and popular database, and it's well-suited for use with Python. In the following section, we are going through how to set up a connection to a MySQL database in an asynchronous manner using the create_asynchrouns_engine function from SQLAlchemy. We'll also use the databases package and the aiomysql extra dependency. We'll also adapt the SQLAlchemy declarative approach to defining our users' table.
-
Django 4.1 alpha 1 released
To take an example: I switched a service over from doing synchronous (plain def everywhere) to async (async def and await everywhere, with async DB, and sawā¦ basically no performance improvement.
- PostgREST v9.0.0
-
python asyncio, how to prevent the other functions "block" themselves when connecting to db?
No, as I said, async db connection is the key. You can do that with SQLAlchemy using the databases library, but since you are not using SQLAlchemy it makes more sense to use the underlying db driver, aiomysql, directly.
- Database library
-
Best approach for async SQLAlchemy in FastAPI
Using the encode/databases library and forgoing SQLAlchemy's ORM
-
FastAPI + Ormar + Alembic setup
ormar is a mini async ORM for python. It uses sqlalchemy for building queries, databases for asynchronous execution of queries, and pydantic for data validation. You can create an ormar model and generate pydantic models from it.
-
async sqlalchemy question db question
works but there seems to be a difference between the regular slqalchemy syntax from what https://github.com/encode/databases/ is using in the docs?
What are some alternatives?
AIOHTTP - Asynchronous HTTP client/server framework for asyncio and Python
aiomysql - aiomysql is a library for accessing a MySQL database from the asyncio
HS-Sanic - Async Python 3.6+ web server/framework | Build fast. Run fast. [Moved to: https://github.com/sanic-org/sanic]
aiosql - Simple SQL in Python
Tornado - Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
asyncmy - A fast asyncio MySQL/MariaDB driver with replication protocol support
django-ninja - šØ Fast, Async-ready, Openapi, type hints based framework for building APIs
alembic - A database migrations tool for SQLAlchemy.
Flask - The Python micro framework for building web applications.
fastapi-users - Ready-to-use and customizable users management for FastAPI
swagger-ui - Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
full-stack-fastapi-template - Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.