asyncpg
pymssql
asyncpg | pymssql | |
---|---|---|
18 | 6 | |
7,522 | 863 | |
0.7% | 0.2% | |
7.7 | 8.6 | |
6 months ago | 7 days ago | |
Python | Python | |
Apache License 2.0 | GNU Lesser General Public License v3.0 only |
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.
asyncpg
-
FastAPI, Pydantic, Psycopg3: the holy trinity for Python web APIs
asyncpg: this was the gold standard async database driver for Postgres, being one of the first to market and most performant. While all other drivers use the C library libpq to interface with Postgres, MagicStack opted to rewrite their own custom implementation and also deviate from Python DBAPI spec. If performance is your main criteria here, then asyncpg is probably the best option.
-
Psycopg 3.2 released – PostgreSQL driver for Python
If you are operating in an environment with asyncio check out asyncpg - https://github.com/MagicStack/asyncpg
Performance charts speak for themselves. This lib uses the binary protocol while most are using text based comms.
- PyPy has been working for me for several years now
-
Ask HN: Is Python async/await some kind of joke?
- SqlAlchemy/asyncpg => you can’t use it if you’re using PgBouncer (necessary most of the time with Postgres) in transaction mode? What?? https://github.com/MagicStack/asyncpg/issues/1058
-
Differences from Psycopg2
OK I stand corrected, asyncpg has these two C files:
https://github.com/MagicStack/asyncpg/blob/master/asyncpg/pr...
https://github.com/MagicStack/asyncpg/blob/master/asyncpg/pr...
If you are interested here is a post by the psycopg author about psycopg2 and 3 and performance versus asyncpg.
https://www.varrazzo.com/blog/2020/05/19/a-trip-into-optimis...
- Asyncpg – A Fast PostgreSQL Database Client Library for Python/Asyncio
-
Ruby Outperforms C: Breaking the Catch-22
This pure Python library claims quite fabulous performance: https://github.com/MagicStack/asyncpg
I believe it because that team have done lots of great stuff but I haven't used it, I just remembered thinking it was interesting the performance was so good. Not sure how related it is to running on the asyncio loop (or which loop they used for benchmarks).
- PgBouncer is useful, important, and fraught with peril
-
Library to connect Python to Postgresql
asyncpg is another great driver if you're using asyncio and want maximum performance (although they also break with DBAPI, but the tradeoff may be worth it).
-
aiopg vs asyncpg vs psycopg3
asyncpg: 5.5k starts, last commit recently, ~150 issues, some incompatibility, few open PRs, extensive README. Includes benchmark showing it's supposedly 3x faster than aiopg and psycopg2, psycopg3 is not mentioned in the benchmark.
pymssql
- Is anyone using PyPy for real work?
-
Uploading CSV files in MSSQL database daily
Install pymssql, connect to the database, read data from files and do a lot of inserts.
-
What does Java do better than Python?
Support of vendors. For example, the MS SQL driver for Python is developed from community a nd for some time it was in a maintenance state because developer stopped the project (see this). Instead, the JDBC driver is developed directly from Microsoft
- Has anyone managed to connect to a SQL Server with Python on a Mac M1?
-
If you frequently use pymssql, checkout my first library: pymssql-utils. Any feedback would also be greatly appreciated!
pymssql-utils is a small library that wraps pymssql with the aim to make your life easier, and your database admins slightly happier.
- Pornspammer buys expired FOSS domain, edits its Read The Docs site
What are some alternatives?
psycopg2 - PostgreSQL database adapter for the Python programming language
dataset - Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.
psycopg - New generation PostgreSQL database adapter for the Python programming language
apsw - Another Python SQLite wrapper
PyMySQL - MySQL client library for Python
awesome-mysql - A curated list of awesome MySQL software, libraries, tools and resources