# SQLAlchemy

Published articles for SQLAlchemy.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Python REST APIs With Flask, Connexion, and SQLAlchemy - Part 1

DevFeed: [Python REST APIs With Flask, Connexion, and SQLAlchemy - Part 1](<https://devfeed.tech/articles/python-rest-apis-with-flask-connexion-and-sqlalchemy-part-1-100399.md>)

Original publisher: [Read original article](<https://realpython.com/flask-connexion-rest-api/>)

Author: Philipp Acsany

Published: 2026-10-25T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [REST API](<https://devfeed.tech/topics/rest-api.md>), [Flask](<https://devfeed.tech/topics/flask.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [Swagger](<https://devfeed.tech/topics/swagger.md>)

Tags: [2022](<https://devfeed.tech/tags/2022.md>), [about](<https://devfeed.tech/tags/about.md>), [added](<https://devfeed.tech/tags/added.md>), [airplay](<https://devfeed.tech/tags/airplay.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [application](<https://devfeed.tech/tags/application.md>), [build](<https://devfeed.tech/tags/build.md>), [flask](<https://devfeed.tech/tags/flask.md>), [foundation](<https://devfeed.tech/tags/foundation.md>), [python](<https://devfeed.tech/tags/python.md>), [rest](<https://devfeed.tech/tags/rest.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>), [rest-apis](<https://devfeed.tech/tags/rest-apis.md>), [series](<https://devfeed.tech/tags/series.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [swagger](<https://devfeed.tech/tags/swagger.md>), [this](<https://devfeed.tech/tags/this.md>), [ui](<https://devfeed.tech/tags/ui.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

The tutorial builds a Flask REST API for managing people, using Connexion to connect OpenAPI definitions to Python functions and generate interactive Swagger UI documentation. It starts with a virtual environment, Flask app, and SQLite as a planned later component, but this part stores records in an in-memory dictionary keyed by unique, case-sensitive last names; changes disappear when the app restarts. The OpenAPI file defines collection and individual-person routes, while handlers list, create, read, update, and delete records. The guide notes that Connexion runs the app with Uvicorn, so it uses `reload=True` and an import string instead of Flask's `debug=True`. Part two is intended to add persistent database storage.

### Source excerpt

Build a Flask REST API with Connexion and Swagger UI in this three-part series. Part one lays the foundation of your application.

## Python REST APIs With Flask, Connexion, and SQLAlchemy - Part 2

DevFeed: [Python REST APIs With Flask, Connexion, and SQLAlchemy - Part 2](<https://devfeed.tech/articles/python-rest-apis-with-flask-connexion-and-sqlalchemy-part-2-99147.md>)

Original publisher: [Read original article](<https://realpython.com/flask-connexion-rest-api-part-2/>)

Author: Philipp Acsany

Published: 2026-10-25T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [REST API](<https://devfeed.tech/topics/rest-api.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Flask](<https://devfeed.tech/topics/flask.md>), [Python](<https://devfeed.tech/topics/python.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>), [Swagger](<https://devfeed.tech/topics/swagger.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [modules](<https://devfeed.tech/topics/modules.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-documentation](<https://devfeed.tech/tags/api-documentation.md>), [apis](<https://devfeed.tech/tags/apis.md>), [array](<https://devfeed.tech/tags/array.md>), [attack](<https://devfeed.tech/tags/attack.md>), [back-end](<https://devfeed.tech/tags/back-end.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [class](<https://devfeed.tech/tags/class.md>), [column](<https://devfeed.tech/tags/column.md>), [commit](<https://devfeed.tech/tags/commit.md>), [config](<https://devfeed.tech/tags/config.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [flask](<https://devfeed.tech/tags/flask.md>), [python](<https://devfeed.tech/tags/python.md>), [rest](<https://devfeed.tech/tags/rest.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>), [rest-apis](<https://devfeed.tech/tags/rest-apis.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

### AI overview

The tutorial replaces a Flask REST API's in-memory `PEOPLE` dictionary with a persistent SQLite database, while keeping the existing endpoints. It demonstrates direct `sqlite3` commands to create and query a `person` table, then explains how interpolating user input into SQL can enable injection attacks. It configures Flask-SQLAlchemy and models the table as a `Person` class with a unique last name, primary key, and UTC timestamps. Flask-Marshmallow schemas validate and convert between JSON and model objects. Updated handlers query, create, update, and delete database records; the home page reads from the database, and Swagger UI can exercise the API. The tutorial notes that SQLite stores the database in a single file and that data now persists across app restarts. The supplied text describes this second installment; adding related notes is reserved for part three.

### Source excerpt

Build a Flask REST API backed by a SQLite database. In part two of this series, you'll use SQLAlchemy and Marshmallow to persist and serialize data.

## Python REST APIs With Flask, Connexion, and SQLAlchemy - Part 3

DevFeed: [Python REST APIs With Flask, Connexion, and SQLAlchemy - Part 3](<https://devfeed.tech/articles/python-rest-apis-with-flask-connexion-and-sqlalchemy-part-3-99148.md>)

Original publisher: [Read original article](<https://realpython.com/flask-connexion-rest-api-part-3/>)

Author: Philipp Acsany

Published: 2026-10-25T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [REST API](<https://devfeed.tech/topics/rest-api.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Flask](<https://devfeed.tech/topics/flask.md>), [Python](<https://devfeed.tech/topics/python.md>), [Swagger](<https://devfeed.tech/topics/swagger.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-documentation](<https://devfeed.tech/tags/api-documentation.md>), [apis](<https://devfeed.tech/tags/apis.md>), [flask](<https://devfeed.tech/tags/flask.md>), [one-to-many](<https://devfeed.tech/tags/one-to-many.md>), [people](<https://devfeed.tech/tags/people.md>), [python](<https://devfeed.tech/tags/python.md>), [rest](<https://devfeed.tech/tags/rest.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>), [rest-apis](<https://devfeed.tech/tags/rest-apis.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>)

### AI overview

The tutorial extends a Flask REST API with notes linked to people through a SQLAlchemy one-to-many relationship. A `note` table stores each note's content, timestamp, and `person_id` foreign key, avoiding repeated person data; SQLAlchemy configures cascading note deletion and newest-first ordering. Marshmallow's `PersonSchema` includes a nested `NoteSchema` so people endpoints return full note objects, and the front end renders each person's notes. New API routes read, update, and delete notes by ID and create notes for an existing person; missing notes or owners produce 404 responses. The provided `build_database.py` script rebuilds `people.db` and seeds sample data, but drops existing database contents when run.

### Source excerpt

Extend your Flask REST API with a SQLAlchemy one-to-many relationship that adds notes to people, and serve them through new API endpoints.

## SQLAlchemy 2.1 brings built-in support for mssql-python

DevFeed: [SQLAlchemy 2.1 brings built-in support for mssql-python](<https://devfeed.tech/articles/sqlalchemy-2-1-brings-built-in-support-for-mssql-python-61032.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/azure-sql/sqlalchemy-2-1-brings-built-in-support-for-mssql-python/>)

Author: Matt Hyon, David Levy

Published: 2026-09-28T16:02:00Z

Content type: release

Language: en

Sources: [Azure SQL Dev Corner](<https://devfeed.tech/sources/azure-sql-dev-corner.md>)

Topics: [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Python Driver for SQL Server](<https://devfeed.tech/topics/python-driver-for-sql-server.md>), [Python Driver for Azure SQL](<https://devfeed.tech/topics/python-driver-for-azure-sql.md>)

Tags: [azure-sql](<https://devfeed.tech/tags/azure-sql.md>), [drivers](<https://devfeed.tech/tags/drivers.md>), [python](<https://devfeed.tech/tags/python.md>), [python-driver-for-sql-server](<https://devfeed.tech/tags/python-driver-for-sql-server.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [sql-server-2025](<https://devfeed.tech/tags/sql-server-2025.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>)

### AI overview

SQLAlchemy 2.1 is generally available with a built-in first-party dialect for Microsoft's mssql-python driver. It supports SQL Server and Azure SQL through SQLAlchemy's ORM and Core APIs, with simpler driver setup, Microsoft Entra authentication options, and continued use of Alembic for schema migrations.

### Source excerpt

We're pleased to share that SQLAlchemy 2.1.0 is now generally available, with built-in support for mssql-python, Microsoft's Python driver for SQL Server. You can now use it with SQLAlchemy's ORM and Core APIs through the first-party mssql+mssqlpython dialect. If SQLAlchemy is already part of how you build, we want this to feel like a natural [...] The post SQLAlchemy 2.1 brings built-in support for mssql-python appeared first on Azure SQL Dev Corner.

## Python features and resources for classes, package management, environments, and parallelism

DevFeed: [Python features and resources for classes, package management, environments, and parallelism](<https://devfeed.tech/articles/supercharge-your-programming-skills-with-python-superpowers-47836.md>)

Original publisher: [Read original article](<https://www.infoworld.com/article/4222329/supercharge-your-programming-skills-with-python-superpowers.html>)

Author: Serdar Yegulalp

Published: 2026-09-18T09:00:00Z

Content type: article

Language: en

Sources: [InfoWorld](<https://devfeed.tech/sources/infoworld.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Dependency management](<https://devfeed.tech/topics/dependency-management.md>), [Parallelism](<https://devfeed.tech/topics/parallelism.md>), [class](<https://devfeed.tech/topics/class.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [NumPy](<https://devfeed.tech/topics/numpy.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Django](<https://devfeed.tech/topics/django.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [classes](<https://devfeed.tech/tags/classes.md>), [dependency-management](<https://devfeed.tech/tags/dependency-management.md>), [django](<https://devfeed.tech/tags/django.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>), [programming-languages-python-software-development](<https://devfeed.tech/tags/programming-languages-python-software-development.md>), [python](<https://devfeed.tech/tags/python.md>), [pytorch](<https://devfeed.tech/tags/pytorch.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>)

### AI overview

This article presents a roundup of Python features and related resources, covering dataclasses, editable package installs, virtual environments, and free-threaded Python. It also highlights updates involving type checking, NumPy universal functions, lazy imports, and Python operation complexity.

### Source excerpt

Some Python features are so useful they feel almost illegal, or like they're granting you superpowers. We have dataclasses to take the hassle out of writing classes, editable installs to speed up package development, virtual environments to simplify dependency management, and a free-threaded Python build to improve parallelism. Want to seize the power of all of these great features? Just follow the links below. Top picks for Python readers on InfoWorld How to use Python dataclasses If you're sick of writing the same boilerplate time and again for your Python classes, try dataclasses. They boil down that boilerplate into a few basic instructions. How to use editable installs for Python packages Sharing locally installed packages across multiple projects is not only easy -- it also gives you a way to update those shared packages without having to reinstall them. Editable installs make this possible. How to use virtual environments in Python It's perhaps the ultimate Python superpower. Virtual environments give each Python program its own little universe of packages and settings. And they have never been easier to work with than they are now. 4 tips for getting started with free-threaded Python Exponentially faster Python programs are now within reach thanks to the new free-threaded build. Just make sure that your programs can be made faster with threading, and that you learn the right level of abstraction for using threads. More good reads and Python updates elsewhere Pyrefly 1.3.0 has arrived The wicked-fast type checker for Python now includes better type inference, along with support for frameworks like Django, SQLAlchemy, and PyTorch and improved support for NumPy and JAX -- all of which have historically lacked good support in Python type checkers. Teaching NumPy's ufuncs new tricks NumPy's universal functions, or "ufuncs", provide vectorized operations across arrays at high speed. This blog post provides a brief introduction to ufuncs and unpacks how some new capa

## Write End-to-End Tests in Your Backend's Language

DevFeed: [Write End-to-End Tests in Your Backend's Language](<https://devfeed.tech/articles/write-end-to-end-tests-in-your-backend-s-language-41361.md>)

Original publisher: [Read original article](<https://spin.atomicobject.com/write-end-to-end-tests-in-your-backends-language/>)

Author: James McConkey

Published: 2026-09-17T12:00:42Z

Content type: tutorial

Language: en

Sources: [Atomic Object](<https://devfeed.tech/sources/atomic-object.md>)

Topics: [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [FastAPI](<https://devfeed.tech/topics/fastapi.md>), [Python](<https://devfeed.tech/topics/python.md>), [test data](<https://devfeed.tech/topics/test-data.md>), [Pydantic](<https://devfeed.tech/topics/pydantic.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [ASP.NET Core](<https://devfeed.tech/topics/asp-net-core.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Docker Compose](<https://devfeed.tech/topics/docker-compose.md>)

Tags: [asp-net-core](<https://devfeed.tech/tags/asp-net-core.md>), [code](<https://devfeed.tech/tags/code.md>), [data](<https://devfeed.tech/tags/data.md>), [docker-compose](<https://devfeed.tech/tags/docker-compose.md>), [exploratory-testing](<https://devfeed.tech/tags/exploratory-testing.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [project-team-management](<https://devfeed.tech/tags/project-team-management.md>), [python](<https://devfeed.tech/tags/python.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [the-software-life](<https://devfeed.tech/tags/the-software-life.md>)

### AI overview

This article argues that end-to-end test-data setup is often the main design challenge, because tests must create consistent domain records while running alongside other tests. It recommends using browser-testing tools in the backend's language when possible, keeping meaningful relationships inline, and extracting small creation helpers without hiding scenario intent.

### Source excerpt

The browser is often the easiest part of an end-to-end test. Consider a test that verifies a user can complete an overdue task. The visible interaction is small: sign in, find the task, click Complete, and observe the new status. Before any of that can happen, the test needs a workspace, a user, a project, and [...] The post Write End-to-End Tests in Your Backend's Language appeared first on Atomic Spin.

## 3.7x Faster Pipelines: Benchmarking Arrow & ADBC vs. SQLAlchemy for EL

DevFeed: [3.7x Faster Pipelines: Benchmarking Arrow & ADBC vs. SQLAlchemy for EL](<https://devfeed.tech/articles/3-7x-faster-pipelines-benchmarking-arrow-adbc-vs-sqlalchemy-for-el-80248.md>)

Original publisher: [Read original article](<https://dlthub.com/blog/arrow-adbc-vs-sqlalchemy>)

Author: Aman Gupta

Published: 2026-02-03T00:00:00Z

Content type: comparison

Language: en

Sources: [DLT Hub](<https://devfeed.tech/sources/dlt-hub.md>)

Topics: [Data pipelines](<https://devfeed.tech/topics/data-pipelines.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [DuckDB](<https://devfeed.tech/topics/duckdb.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Schema-less data format](<https://devfeed.tech/topics/schema-less-data-format.md>)

Tags: [arrow](<https://devfeed.tech/tags/arrow.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [dataengineering](<https://devfeed.tech/tags/dataengineering.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [product](<https://devfeed.tech/tags/product.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [updates](<https://devfeed.tech/tags/updates.md>)

### AI overview

A benchmark comparing SQLAlchemy's row-based ingestion with an Arrow and ADBC columnar path moved 5 million rows from DuckDB to MySQL. The columnar path reduced the reported runtime from 344 seconds to 92 seconds, a 3.7x speedup, by avoiding Python object conversion and using bulk loading.

### Source excerpt

Moved 5M rows from DuckDB to MySQL 3.7x faster, reducing time from 344s to 92s by switching from SQLAlchemy's row-by-row path to Arrow + ADBC's columnar pipeline.

## New SDKs for Python and SQLAlchemy

DevFeed: [New SDKs for Python and SQLAlchemy](<https://devfeed.tech/articles/new-sdks-for-python-and-sqlalchemy-6013.md>)

Original publisher: [Read original article](<https://turso.tech/blog/new-sdks-for-python-and-sqlalchemy>)

Author: Levy Albuquerque

Published: 2025-06-10T00:00:00Z

Content type: release

Language: en

Sources: [Turso](<https://devfeed.tech/sources/turso-blog.md>)

Topics: [SDK](<https://devfeed.tech/topics/sdk.md>), [migration](<https://devfeed.tech/topics/migration.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [database](<https://devfeed.tech/tags/database.md>), [drivers](<https://devfeed.tech/tags/drivers.md>), [fly-io](<https://devfeed.tech/tags/fly-io.md>), [github](<https://devfeed.tech/tags/github.md>), [libsql](<https://devfeed.tech/tags/libsql.md>), [migration](<https://devfeed.tech/tags/migration.md>), [python](<https://devfeed.tech/tags/python.md>), [sdks](<https://devfeed.tech/tags/sdks.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [turso](<https://devfeed.tech/tags/turso.md>)

### AI overview

Turso announces official Python SDKs for libsql and SQLAlchemy. Users should upgrade before older websocket-based drivers stop working after the stated migration deadline.

### Source excerpt

Turso ships new official Python SDKs: 'libsql' and 'sqlalchemy-libsql'. Upgrade before June 18 when older websocket-based drivers stop working on AWS.

## Looking at How Replit Agent Handles Databases

DevFeed: [Looking at How Replit Agent Handles Databases](<https://devfeed.tech/articles/looking-at-how-replit-agent-handles-databases-5516.md>)

Original publisher: [Read original article](<https://neon.com/blog/looking-at-how-replit-agent-handles-databases>)

Author: Sam Harrison

Published: 2024-11-08T17:59:23Z

Content type: article

Language: en

Sources: [Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [Repl.it](<https://devfeed.tech/topics/replit.md>), [Database](<https://devfeed.tech/topics/database.md>), [Database Migration](<https://devfeed.tech/topics/database-migration.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Flask](<https://devfeed.tech/topics/flask.md>), [Python](<https://devfeed.tech/topics/python.md>), [Web app](<https://devfeed.tech/topics/webapp.md>), [API](<https://devfeed.tech/topics/api.md>), [Front end](<https://devfeed.tech/topics/frontend.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [api](<https://devfeed.tech/tags/api.md>), [applications](<https://devfeed.tech/tags/applications.md>), [code](<https://devfeed.tech/tags/code.md>), [database-migration](<https://devfeed.tech/tags/database-migration.md>), [databases](<https://devfeed.tech/tags/databases.md>), [development](<https://devfeed.tech/tags/development.md>), [flask](<https://devfeed.tech/tags/flask.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [product](<https://devfeed.tech/tags/product.md>), [python](<https://devfeed.tech/tags/python.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [web](<https://devfeed.tech/tags/web.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

### AI overview

This article examines how Replit Agent uses natural-language prompts and AI to build and evolve a full-stack TODO application. It focuses on coordinating Flask, SQLAlchemy, Alembic migrations, and a managed Neon PostgreSQL database while updating the API, schema, and frontend together.

### Source excerpt

Replit Agent is a powerful tool within the Replit development environment that allows you to offload coding tasks using natural language and AI. By interacting with the Replit Agent, you can generate code, create applications, and modify existing features simply by asking for wha...

## Creating a website using htmx and Turso

DevFeed: [Creating a website using htmx and Turso](<https://devfeed.tech/articles/creating-a-website-using-htmx-and-turso-5921.md>)

Original publisher: [Read original article](<https://turso.tech/blog/creating-a-website-using-htmx-and-turso-7727d396ef77>)

Author: James Sinkala

Published: 2023-09-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Turso](<https://devfeed.tech/sources/turso-blog.md>)

Topics: [htmx](<https://devfeed.tech/topics/htmx.md>), [Website](<https://devfeed.tech/topics/website.md>), [Turso](<https://devfeed.tech/topics/turso.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>), [Replication](<https://devfeed.tech/topics/replication.md>)

Tags: [cloud](<https://devfeed.tech/tags/cloud.md>), [database](<https://devfeed.tech/tags/database.md>), [devices](<https://devfeed.tech/tags/devices.md>), [htmx](<https://devfeed.tech/tags/htmx.md>), [offline](<https://devfeed.tech/tags/offline.md>), [python](<https://devfeed.tech/tags/python.md>), [servers](<https://devfeed.tech/tags/servers.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [sync](<https://devfeed.tech/tags/sync.md>), [turso](<https://devfeed.tech/tags/turso.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

A tutorial titled "Creating a website using htmx and Turso" explains how to create a dynamic website with htmx and Turso. The supplied text also notes that Turso is a rewrite of SQLite and supports querying databases over the wire, device and server synchronization, and offline use.

### Source excerpt

Learn how to create a dynamic website using htmx and Turso, the edge database

## Trino charms Python

DevFeed: [Trino charms Python](<https://devfeed.tech/articles/trino-charms-python-8687.md>)

Original publisher: [Read original article](<https://trino.io/blog/2022/09/20/python-progress.html>)

Author: Manfred Moser, Brian Zhan, Dain Sundstrom

Published: 2022-09-20T00:00:00Z

Content type: opinion

Language: en

Sources: [Trino](<https://devfeed.tech/sources/trino-blog.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [airflow](<https://devfeed.tech/topics/airflow.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [data-processing](<https://devfeed.tech/topics/data-processing.md>)

Tags: [airflow](<https://devfeed.tech/tags/airflow.md>), [python](<https://devfeed.tech/tags/python.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [tooling](<https://devfeed.tech/tags/tooling.md>), [tools-and-integrations](<https://devfeed.tech/tags/tools-and-integrations.md>)

### AI overview

The article reviews the growth of Python support around Trino, highlighting the trino-python-client, SQLAlchemy, dbt-trino, Apache Airflow, Apache Superset, Airbyte, notebooks, and related integrations. It invites users to share additional use cases and problems to help improve the ecosystem.

### Source excerpt

Wow, have we ever come a long way with Python support for Trino. It feels like ages ago that we talked about DB-API, trino-python-client, SQLAlchemy, Apache Superset, and more in Trino Community Broadcast episode 12. More recently we talked about dbt in episode 21 and episode 30, but there is so much more for Pythonistas, Pythonians, Python programmers, and simply users of Python-powered tools.

## CodeQL code scanning now recognizes more Python libraries and frameworks

DevFeed: [CodeQL code scanning now recognizes more Python libraries and frameworks](<https://devfeed.tech/articles/codeql-code-scanning-now-recognizes-more-python-libraries-and-frameworks-74241.md>)

Original publisher: [Read original article](<https://github.blog/changelog/2021-11-24-codeql-code-scanning-now-recognizes-more-python-libraries-and-frameworks>)

Author: Sidi Merzouk

Published: 2021-11-24T17:02:08Z

Content type: release

Language: en

Sources: [GitHub Changelog](<https://devfeed.tech/sources/github-changelog.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [FastAPI](<https://devfeed.tech/topics/fastapi.md>)

Tags: [code-scanning](<https://devfeed.tech/tags/code-scanning.md>), [codeql](<https://devfeed.tech/tags/codeql.md>), [django-rest-framework](<https://devfeed.tech/tags/django-rest-framework.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [flask](<https://devfeed.tech/tags/flask.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [libraries-and-frameworks](<https://devfeed.tech/tags/libraries-and-frameworks.md>), [module](<https://devfeed.tech/tags/module.md>), [python](<https://devfeed.tech/tags/python.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>)

### AI overview

CodeQL's Python analysis now supports FastAPI, aiomysql, aiopg, asyncpg, Django REST framework, `os.path`, Flask-Admin, toml, ruamel.yaml, and SQLAlchemy. The added coverage lets CodeQL detect more potential sources of untrusted input, the steps through which it flows, and potentially dangerous sinks, improving code scanning alert quality. GitHub says it prioritizes supported libraries and frameworks based on popularity and user feedback. The improvements are available on GitHub.com and are planned for GitHub Enterprise Server 3.4.

### Source excerpt

We've improved the depth of CodeQL's Python analysis by adding support for more libraries and frameworks, including: FastAPI aiomysql aiopg asyncpg Django REST framework The os.path module Flask-Admin toml ruamel.yaml...

## Five Ways to Paginate in PostgreSQL

DevFeed: [Five Ways to Paginate in PostgreSQL](<https://devfeed.tech/articles/five-ways-to-paginate-in-postgresql-21470.md>)

Original publisher: [Read original article](<https://begriffs.com/posts/2016-03-30-five-ways-to-paginate.html>)

Published: 2016-03-30T00:00:00Z

Content type: article

Language: en

Sources: [Joe Nelson](<https://devfeed.tech/sources/joe-nelson.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Database](<https://devfeed.tech/topics/database.md>), [Web app](<https://devfeed.tech/topics/webapp.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>)

Tags: [application-development](<https://devfeed.tech/tags/application-development.md>), [database](<https://devfeed.tech/tags/database.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

### AI overview

This article examines several server-side pagination methods in PostgreSQL, compares their tradeoffs, and explains when client-side pagination may be preferable. It highlights the limitations of limit-offset pagination, including result inconsistency and inefficiency with large offsets.

### Source excerpt

2016-03-30 (Cross-posted on the Citus Data blog.) It may surprise you that pagination, pervasive as it is in web applications, is easy to implement inefficiently. In this article we'll examine several methods of server-side pagination and discuss their tradeoffs when implemented in PostgreSQL. This article will help you identify which technique is appropriate for your situation, including some you may not have seen before which rely on physical clustering and the database stats collector.

## Postgres and Connection Pooling

DevFeed: [Postgres and Connection Pooling](<https://devfeed.tech/articles/postgres-and-connection-pooling-41170.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2014/05/22/Postgres-and-Connection-Pooling/>)

Author: Map

Published: 2014-05-22T20:55:56Z

Content type: article

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [connection pool](<https://devfeed.tech/topics/connection-pool.md>), [Database](<https://devfeed.tech/topics/database.md>), [Ruby on Rails](<https://devfeed.tech/topics/ruby-on-rails.md>)

Tags: [connection-pooling](<https://devfeed.tech/tags/connection-pooling.md>), [django](<https://devfeed.tech/tags/django.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [python](<https://devfeed.tech/tags/python.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [ssl](<https://devfeed.tech/tags/ssl.md>), [transaction](<https://devfeed.tech/tags/transaction.md>)

### AI overview

Connection pooling avoids the latency of establishing a database connection for each request; the source estimates SSL negotiation can add 30-50 ms. Framework pools are available in Sequel and SQLAlchemy, while Rails may need pool-size configuration; Django 1.6 is described as supporting persistent connections by default and an optional pool. Persistent connections can reduce setup overhead but limit each web-server entry point to one connection. For Postgres, the source cites roughly 5-10 MB of memory per connection and recommends considering a standalone pooler above 100 connections. Such poolers can manage sessions, transactions, or statements; the source contrasts PG Bouncer's cited 2 KB per connection with standard Postgres connections and favors PG Bouncer for its focused scope over PG Pool's broader feature set.

### Source excerpt

Connection pooling is quickly becoming one of the more frequent questions I hear. So here's a primer on it. If there's enough demand I'll follow up a bit further with some detail on specific Postgres connection poolers and setting them up. The basics For those unfamiliar, a connection pool is a group of database connections sitting around that are waiting to be handed out and used. This means when a request comes in a connection is already there whether in your framework or some other pooling process, and then given to your application for that specific request or transaction. In contrast, without any connection pooling your application will have to reach out to your database to establish a connection. While in the most basic sense you may thinking connecting to a database is quick, often theres some overhead here. An example is SSL negotiation that may have to occur which means you're looking at not 1-2 ms but often closer to 30-50. The options There's really two major options when it comes to connection pooling: Framework pooling Standalone pooler Persistent connections Framework pooling Today many modern application frameworks have at least some basic level of connection pooling. This means as your application server starts up it will create a pool of connections to use. It's worth noting that while most modern frameworks have pooling, not all do, and further it may not be enabled by default. If you're using the Sequel ORM for Ruby or SQLAlchemy for Python you're well covered here. Further Rails is in pretty good shape also, though you may want to configure the pool size. For Django it's a bit of a mixed story. For some time Django did not have pooling at all. As of Django 1.6 you now have persistent connections by default and the ability to enable a pool. Persistent connections Persistent connections don't offer all of the benefits of pooling, but can often work well enough. Persistent connections is the act of maintaining a connection to your database once it's

## Postgres Pooling with Django

DevFeed: [Postgres Pooling with Django](<https://devfeed.tech/articles/postgres-pooling-with-django-41119.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2012/10/02/Postgres-Pooling-with-Django/>)

Author: Map

Published: 2012-10-02T20:55:56Z

Content type: article

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [Django](<https://devfeed.tech/topics/django.md>), [Database](<https://devfeed.tech/topics/database.md>), [Heroku Postgres](<https://devfeed.tech/topics/heroku-postgres.md>), [Python](<https://devfeed.tech/topics/python.md>), [hosting](<https://devfeed.tech/topics/hosting.md>)

Tags: [connection-pooling](<https://devfeed.tech/tags/connection-pooling.md>), [database](<https://devfeed.tech/tags/database.md>), [django](<https://devfeed.tech/tags/django.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [heroku](<https://devfeed.tech/tags/heroku.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [orm](<https://devfeed.tech/tags/orm.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [python](<https://devfeed.tech/tags/python.md>), [queries](<https://devfeed.tech/tags/queries.md>), [rendering](<https://devfeed.tech/tags/rendering.md>), [replication](<https://devfeed.tech/tags/replication.md>), [request](<https://devfeed.tech/tags/request.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [ssl](<https://devfeed.tech/tags/ssl.md>)

### AI overview

The excerpt presents django_postgrespool, a Django database backend using SQLAlchemy's connection pooling, as an alternative to running a separate pooling service. It distinguishes PgBouncer, which is focused on pooling, from pgPool, which also offers replication and load balancing; it notes both may have trouble recovering from network issues or handling SSL renegotiation. In the author's Heroku example, Postgres accounts for about half of request time on a basic view, though the excerpt cannot establish how much is connection overhead. It proposes trying django_postgrespool and mentions measuring performance afterward, but provides no results.

### Source excerpt

A feature thats glaringly missing within Django and common in many other frameworks including many Java frameworks and Rails is connection pooling for your database connection. As most Django users are Postgres users the default answer is to use something like pgPool or pgBouncer. This are tools that you can run that will persist a connection to your Postgres database intended to offer: Connection Pooling Replication Load Balancing Its of not that PgBouncer is intended very specifically for pooling while pgPool does much more. Each of these in many cases can come with caveats though. If there are issues within your network they may not re-establish the connection properly. They also are not known to handle SSL renegotiation very well. Finally given running one more piece of software to reduce connection times it seems like a lot of overhead to simply reduce the connection time to your database. Is connection time a real problem? Given a well refined app, with a well refined schema with appropriate indexes your view should be doing things pretty quickly. If this is the case without some form of connection pooling and running in a cloud environment (in this case Heroku) your application performance looks like: If you'll notice that about 50% of our request time was in Postgres. The hard part to see is how much of this is actually doing something. In this case its issuing some very basic queries then rendering a very basic view. The solution By using something in the other Python ORM, SQLAlchemy, we can take advantage of its connection pooling. Large thanks to Kenneth Reitz for packaging this up into an easy to install and easy to use format as a Django DB backend. Using django_postgrespool it will take advantage of connection pooling and we can then see the performance after: