databases icon indicating copy to clipboard operation
databases copied to clipboard

Async database support for Python. 🗄

Results 140 databases issues
Sort by recently updated
recently updated
newest added

MRE: ``` import databases @pytest.fixture(scope="session") def db(): return databases.Database("postgres://...") @pytest.fixture() async def transaction(db): await db.connect() async with db.transaction(force_rollback=True): yield db async def test_example(transaction): await transaction.execute("select 1") ``` ``` ___________________________________ ERROR...

bug

I am experiencing an issue with the MySQL connection pool. I have been testing the following code: ```python DATABASE_URL = "mysql+aiomysql://root:root192.168.62.195:3306/test?charset=utf8mb4" # Additional database URL parameters can also be passed...

bug

_Originally posted by @zevisert in https://github.com/encode/databases/pull/546#discussion_r1203318920_ Scenarios where a transaction instance is deleted without calling `.commit()` or `.rollback()` (perhaps because a database or connection is being garbage collected) are possible...

clean up

Hi, I am developing an API using FastAPI and Databases. I recently updated most of the projects libraries, and I'm encountering some issue with my tests. I used to use...

```python mysql://root:123456../@myhost:3306/mydb ``` ValueError: Port could not be cast to integer value as '123456..'

### Issue Dear Community, The issue occurs within nested transactions as soon as a short period of disconnection from the database, the databases couldn't automatically reconnect the target database but...

I would like to manage rotating password for database connection. In SQLAlchemy, [create_engine](https://docs.sqlalchemy.org/en/13/core/engines.html#sqlalchemy.create_engine) method supports the argument `creator` and I can do something like this: ```python create_engine('postgresql://', creator=lambda: psycopg2.connect(make_dsn_string())) ```...

Has there been any discussion around support for [psycopg 3](https://www.psycopg.org/features/) (now just psycopg)? It is a complete rewrite of the project. It was implemented to support async from the start....

I'm trying to connect to planetscale's mysql database, but I can't get the connection working. They offer a snippet of code, on how to connect to them using different programming...

- OS: Windows 11 - Python version: 3.11.0 - Databases version: 0.7.0 - Database backend: PostgreSQL - Database driver: asyncpg I have an SQLAlchemy table with one primary key column...