# SQLAlchemy

Python SQL toolkit and object-relational mapper for database access.

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

## 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: [Testing](<https://devfeed.tech/topics/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>), [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>), [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.

## 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: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [Repl.it](<https://devfeed.tech/topics/replit.md>), [Databases](<https://devfeed.tech/topics/databases.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 applications](<https://devfeed.tech/topics/web-applications.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...

## 10x faster python test iteration via fork(2)

DevFeed: [10x faster python test iteration via fork(2)](<https://devfeed.tech/articles/10x-faster-python-test-iteration-via-fork-2-20122.md>)

Original publisher: [Read original article](<https://benchling.engineering/10x-faster-python-test-iteration-via-fork-2-3aae52d2f6?source=rss----3d4aa8fb07ea---4>)

Author: raylu

Published: 2023-07-20T16:01:45Z

Content type: tutorial

Language: en

Sources: [Benchling](<https://devfeed.tech/sources/benchling.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [modules](<https://devfeed.tech/topics/modules.md>), [import](<https://devfeed.tech/topics/import.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [benchling](<https://devfeed.tech/tags/benchling.md>), [code](<https://devfeed.tech/tags/code.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [developer-productivity](<https://devfeed.tech/tags/developer-productivity.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fork](<https://devfeed.tech/tags/fork.md>), [import](<https://devfeed.tech/tags/import.md>), [modules](<https://devfeed.tech/tags/modules.md>), [python](<https://devfeed.tech/tags/python.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This Benchling Engineering article explains how the Build team reduced Python test iteration time in a dependency-heavy codebase. It discusses the limitations of importlib.reload() and describes a fork-based approach that made the second test run start 10 times faster, reducing waiting by 90%.

### Source excerpt

It's ideal to get feedback on your code faster -- to make a code change and see the result instantly. But, as projects get larger, reload times get longer. Each incremental dependency or bootstrap code block that adds 200ms feels worth it, but 50 of them later and it takes 10 seconds to see the result of a code change. On the Build team at Benchling, that's where we found ourselves one day. We used 146 packages which pull in 128 transitive dependencies for a total of 274 packages. We also spent a lot of time waiting for SQLAlchemy models to initialize. The result is our test harness took 10 seconds to set up. After making a code change, you'd start the test runner, wait a few seconds, alt+tab to your browser, get distracted for a few minutes, and then find out you had a typo in your code. This is a common challenge for a growing codebase, but it's something we knew we needed to fix. Here's the process we arrived at which allowed the second run of tests to start 10x faster -- 90% less waiting. While it'll work a little differently for your codebase depending on the language, dependencies, etc. you're using, hopefully this can inspire you on your journey to faster feedback and testing. importlib.reload() Since the problem is that we spend so long setting up a bunch of modules just right and then want to see the change in a single file we're editing, the most obvious solution is to use importlib.reload from the standard library. import importlib import sys import test_harness_stuff # takes 10 seconds import tests def rerun_tests(changed_path): for mod in sys.modules.values(): if mod.__file__ == changed_path: importlib.reload(mod) tests.run_tests() break if __name__ == '__main__': setup_file_watcher(rerun_tests) tests.run_tests() This (with some special handling for built-in modules, relative path resolution, and batching to handle editors that perform multiple filesystem operations per save) works alright when the file being changed is a test file (or any other leaf node

## 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 Blog](<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>), [SDKs](<https://devfeed.tech/topics/sdks.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.

## Datalore Enterprise 2021.3: ячейки SQL, подключение Jupyter-ноутбуков к БД, интерактивные отчеты и многое другое

DevFeed: [Datalore Enterprise 2021.3: ячейки SQL, подключение Jupyter-ноутбуков к БД, интерактивные отчеты и многое другое](<https://devfeed.tech/articles/datalore-enterprise-2021-3-sql-jupyter-23947.md>)

Original publisher: [Read original article](<https://habr.com/ru/companies/JetBrains/articles/593959/>)

Author: alenaguzharina (JetBrains)

Published: 2021-12-07T14:10:12Z

Content type: release

Language: ru

Sources: [JetBrains RU](<https://devfeed.tech/sources/jetbrains-ru.md>)

Topics: [Data Science](<https://devfeed.tech/topics/data-science.md>), [jupyter](<https://devfeed.tech/topics/jupyter.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [R](<https://devfeed.tech/topics/r.md>), [Scala](<https://devfeed.tech/topics/scala.md>), [Amazon Redshift](<https://devfeed.tech/topics/amazon-redshift.md>), [Azure SQL](<https://devfeed.tech/topics/azure-sql.md>), [MariaDB](<https://devfeed.tech/topics/mariadb.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Oracle Database](<https://devfeed.tech/topics/oracle-database.md>)

Tags: [azure-sql](<https://devfeed.tech/tags/azure-sql.md>), [data](<https://devfeed.tech/tags/data.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [database](<https://devfeed.tech/tags/database.md>), [datalore](<https://devfeed.tech/tags/datalore.md>), [jupyter](<https://devfeed.tech/tags/jupyter.md>), [jupyterhub](<https://devfeed.tech/tags/jupyterhub.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [plus-a5524f17cbdd](<https://devfeed.tech/tags/plus-a5524f17cbdd.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [python](<https://devfeed.tech/tags/python.md>), [scala](<https://devfeed.tech/tags/scala.md>), [sql](<https://devfeed.tech/tags/sql.md>), [tag-4d3456108bed](<https://devfeed.tech/tags/tag-4d3456108bed.md>), [tag-b0c5f1e2d8ce](<https://devfeed.tech/tags/tag-b0c5f1e2d8ce.md>), [tag-baf5012a40ff](<https://devfeed.tech/tags/tag-baf5012a40ff.md>)

### AI overview

This release article presents Datalore Enterprise 2021.3, a data science platform for collaborative Jupyter notebooks. The update adds database connections and native SQL cells, with query results transferred to pandas DataFrames, support for R and Scala notebooks, reactive features, chart builders, and interactive report publishing.

### Source excerpt

Привет, Хабр! Datalore Enterprise -- это data science платформа для совместной работы с Jupyter-ноутбуками. Ее можно установить в частное облако или на приватный сервер компании. Новая версия 2021.3 позволяет специалистам по анализу и обработке данных работать с базами данных и SQL-кодом внутри Jupyter-ноутбуков, а также легко делиться результатами работы с коллегами. Также мы интегрировали поддержку ноутбуков R и Scala, добавили новый реактивный режим, реализовали конструкторы графиков и множество других функций. Читайте дальше, чтобы узнать о новых возможностях Datalore Enterprise 2021.3! Читать далее

## Using GraphQL with Python - A Complete Guide

DevFeed: [Using GraphQL with Python - A Complete Guide](<https://devfeed.tech/articles/using-graphql-with-python-a-complete-guide-23257.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/complete-api-guide>)

Author: Shadid Haque

Published: 2021-05-11T14:10:54Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Python](<https://devfeed.tech/topics/python.md>), [Flask](<https://devfeed.tech/topics/flask.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [API](<https://devfeed.tech/topics/api.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Cross-origin resource sharing (CORS)](<https://devfeed.tech/topics/cors.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [extension](<https://devfeed.tech/tags/extension.md>), [flask](<https://devfeed.tech/tags/flask.md>), [graphos](<https://devfeed.tech/tags/graphos.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [python](<https://devfeed.tech/tags/python.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>)

### AI overview

This tutorial explains how to build a GraphQL API with Python, Flask, and Ariadne. It covers setting up a Flask web server, implementing GraphQL, composing a schema, and performing queries and mutations, with dependencies including Flask-SQLAlchemy and Flask-Cors.

### Source excerpt

We recently released an updated Python tutorial post using Strawberry and GraphOS. You can check it out here! Known for its ease of use and simplicity, Python is one of the most beloved general-purpose programming languages. And GraphQL, a declarative query language for APIs and server runtimes, pairs quite nicely with Python. Unfortunately, there are very few comprehensive learning materials out there that give you a step-by-step breakdown of how to use GraphQL with Python.

## 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: tutorial

Language: en

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

Topics: [connection pool](<https://devfeed.tech/topics/connection-pool.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Django](<https://devfeed.tech/topics/django.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [SSL](<https://devfeed.tech/topics/ssl.md>)

Tags: [connection-pool](<https://devfeed.tech/tags/connection-pool.md>), [connection-pooling](<https://devfeed.tech/tags/connection-pooling.md>), [database](<https://devfeed.tech/tags/database.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>)

### AI overview

A primer on database connection pooling explains how pooled, persistent, and standalone connections reduce connection-establishment overhead, including SSL negotiation. It discusses framework support in Ruby, Python, Rails, and Django, and notes Postgres connection and memory considerations.

### 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: tutorial

Language: en

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

Topics: [Django](<https://devfeed.tech/topics/django.md>), [SQLAlchemy](<https://devfeed.tech/topics/sqlalchemy.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>), [Heroku](<https://devfeed.tech/topics/heroku.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>), [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>), [replication](<https://devfeed.tech/tags/replication.md>), [sqlalchemy](<https://devfeed.tech/tags/sqlalchemy.md>), [ssl](<https://devfeed.tech/tags/ssl.md>)

### AI overview

This article discusses database connection pooling for Django applications using Postgres. It reviews pgPool and pgBouncer, notes possible operational caveats, and presents SQLAlchemy with django_postgrespool as a Django database backend that provides connection pooling.

### 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: