Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit 6108c50

Browse files
committed
Revert "Switch extra installations to specific drivers (#436)"
This reverts commit c2417cd.
1 parent e28a8d9 commit 6108c50

File tree

5 files changed

+36
-45
lines changed

5 files changed

+36
-45
lines changed

README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,21 @@ Databases is suitable for integrating against any async Web framework, such as [
2929
$ pip install databases
3030
```
3131

32-
Database drivers supported are:
33-
34-
* [asyncpg][asyncpg]
35-
* [aiopg][aiopg]
36-
* [aiomysql][aiomysql]
37-
* [asyncmy][asyncmy]
38-
* [aiosqlite][aiosqlite]
39-
4032
You can install the required database drivers with:
4133

4234
```shell
43-
$ pip install databases[asyncpg]
44-
$ pip install databases[aiopg]
45-
$ pip install databases[aiomysql]
46-
$ pip install databases[asyncmy]
47-
$ pip install databases[aiosqlite]
35+
$ pip install databases[postgresql]
36+
$ pip install databases[mysql]
37+
$ pip install databases[sqlite]
38+
```
39+
40+
Default driver support is provided using one of [asyncpg][asyncpg], [aiomysql][aiomysql], or [aiosqlite][aiosqlite].
41+
42+
You can also use other database drivers supported by `databases`:
43+
44+
```shel
45+
$ pip install databases[postgresql+aiopg]
46+
$ pip install databases[mysql+asyncmy]
4847
```
4948

5049
Note that if you are using any synchronous SQLAlchemy functions such as `engine.create_all()` or [alembic][alembic] migrations then you still have to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and [pymysql][pymysql] for MySQL.
@@ -57,7 +56,7 @@ For this example we'll create a very simple SQLite database to run some
5756
queries against.
5857

5958
```shell
60-
$ pip install databases[aiosqlite]
59+
$ pip install databases[sqlite]
6160
$ pip install ipython
6261
```
6362

@@ -69,7 +68,7 @@ expressions directly from the console.
6968
```python
7069
# Create a database instance, and connect to it.
7170
from databases import Database
72-
database = Database('sqlite+aiosqlite:///example.db')
71+
database = Database('sqlite:///example.db')
7372
await database.connect()
7473

7574
# Create a table.
@@ -104,10 +103,8 @@ for examples of how to start using databases together with SQLAlchemy core expre
104103
[psycopg2]: https://www.psycopg.org/
105104
[pymysql]: https://github.com/PyMySQL/PyMySQL
106105
[asyncpg]: https://github.com/MagicStack/asyncpg
107-
[aiopg]: https://github.com/aio-libs/aiopg
108106
[aiomysql]: https://github.com/aio-libs/aiomysql
109-
[asyncmy]: https://github.com/long2ice/asyncmy
110-
[aiosqlite]: https://github.com/omnilib/aiosqlite
107+
[aiosqlite]: https://github.com/jreese/aiosqlite
111108

112109
[starlette]: https://github.com/encode/starlette
113110
[sanic]: https://github.com/huge-success/sanic

docs/connections_and_transactions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ and for configuring the connection pool.
4444

4545
```python
4646
# Use an SSL connection.
47-
database = Database('postgresql+asyncpg://localhost/example?ssl=true')
47+
database = Database('postgresql://localhost/example?ssl=true')
4848

4949
# Use a connection pool of between 5-20 connections.
50-
database = Database('mysql+aiomysql://localhost/example?min_size=5&max_size=20')
50+
database = Database('mysql://localhost/example?min_size=5&max_size=20')
5151
```
5252

5353
You can also use keyword arguments to pass in any connection options.
5454
Available keyword arguments may differ between database backends.
5555

5656
```python
57-
database = Database('postgresql+asyncpg://localhost/example', ssl=True, min_size=5, max_size=20)
57+
database = Database('postgresql://localhost/example', ssl=True, min_size=5, max_size=20)
5858
```
5959

6060
## Transactions

docs/database_queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You can now use any [SQLAlchemy core][sqlalchemy-core] queries ([official tutori
3434
```python
3535
from databases import Database
3636

37-
database = Database('postgresql+asyncpg://localhost/example')
37+
database = Database('postgresql://localhost/example')
3838

3939

4040
# Establish the connection pool

docs/index.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,21 @@ Databases is suitable for integrating against any async Web framework, such as [
2727
$ pip install databases
2828
```
2929

30-
Database drivers supported are:
31-
32-
* [asyncpg][asyncpg]
33-
* [aiopg][aiopg]
34-
* [aiomysql][aiomysql]
35-
* [asyncmy][asyncmy]
36-
* [aiosqlite][aiosqlite]
37-
3830
You can install the required database drivers with:
3931

4032
```shell
41-
$ pip install databases[asyncpg]
42-
$ pip install databases[aiopg]
43-
$ pip install databases[aiomysql]
44-
$ pip install databases[asyncmy]
45-
$ pip install databases[aiosqlite]
33+
$ pip install databases[postgresql]
34+
$ pip install databases[mysql]
35+
$ pip install databases[sqlite]
36+
```
37+
38+
Default driver support is provided using one of [asyncpg][asyncpg], [aiomysql][aiomysql], or [aiosqlite][aiosqlite].
39+
40+
You can also use other database drivers supported by `databases`:
41+
42+
```shel
43+
$ pip install databases[postgresql+aiopg]
44+
$ pip install databases[mysql+asyncmy]
4645
```
4746

4847
Note that if you are using any synchronous SQLAlchemy functions such as `engine.create_all()` or [alembic][alembic] migrations then you still have to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and [pymysql][pymysql] for MySQL.
@@ -55,7 +54,7 @@ For this example we'll create a very simple SQLite database to run some
5554
queries against.
5655

5756
```shell
58-
$ pip install databases[aiosqlite]
57+
$ pip install databases[sqlite]
5958
$ pip install ipython
6059
```
6160

@@ -67,7 +66,7 @@ expressions directly from the console.
6766
```python
6867
# Create a database instance, and connect to it.
6968
from databases import Database
70-
database = Database('sqlite+aiosqlite:///example.db')
69+
database = Database('sqlite:///example.db')
7170
await database.connect()
7271

7372
# Create a table.
@@ -102,10 +101,8 @@ for examples of how to start using databases together with SQLAlchemy core expre
102101
[psycopg2]: https://www.psycopg.org/
103102
[pymysql]: https://github.com/PyMySQL/PyMySQL
104103
[asyncpg]: https://github.com/MagicStack/asyncpg
105-
[aiopg]: https://github.com/aio-libs/aiopg
106104
[aiomysql]: https://github.com/aio-libs/aiomysql
107-
[asyncmy]: https://github.com/long2ice/asyncmy
108-
[aiosqlite]: https://github.com/omnilib/aiosqlite
105+
[aiosqlite]: https://github.com/jreese/aiosqlite
109106

110107
[starlette]: https://github.com/encode/starlette
111108
[sanic]: https://github.com/huge-success/sanic

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,10 @@ def get_packages(package):
5050
install_requires=["sqlalchemy>=1.4,<1.5", 'aiocontextvars;python_version<"3.7"'],
5151
extras_require={
5252
"postgresql": ["asyncpg"],
53-
"asyncpg": ["asyncpg"],
54-
"aiopg": ["aiopg"],
5553
"mysql": ["aiomysql"],
56-
"aiomysql": ["aiomysql"],
57-
"asyncmy": ["asyncmy"],
54+
"mysql+asyncmy": ["asyncmy"],
5855
"sqlite": ["aiosqlite"],
59-
"aiosqlite": ["aiosqlite"],
56+
"postgresql+aiopg": ["aiopg"],
6057
},
6158
classifiers=[
6259
"Development Status :: 3 - Alpha",

0 commit comments

Comments
 (0)