r/Python • • Nov 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

33 Upvotes

208 comments sorted by

View all comments

1

u/M4RC0Sx 7d ago

rustmy: a MySQL/MariaDB driver for Python written in Rust

What it does: a DB-API driver with the same API as mysqlclient and PyMySQL (`%s` placeholders, cursors, `conv=`, my.cnf files), so switching is usually just the import. It also has asyncio (shaped like aiomysql/asyncmy), connection pools, SQLAlchemy dialects and Django support. Prebuilt wheels for Linux, macOS and Windows, Python 3.10 to 3.15 including free-threaded, no libmysqlclient needed.

Target audience: anyone using MySQL or MariaDB from Python who cares about read and bulk insert speed. It's new (1.0 came out in November), but tested against nine server versions, the PEP 249 suite and the SQLAlchemy and Django test suites.

Comparison: on my machine it reads 1M rows in 0.40 s vs 1.32 s with mysqlclient and 3.19 s with PyMySQL, and inserts 1M rows 3.3x faster than mysqlclient. Through an ORM the gain is about 1.4x, and lots of tiny queries won't get faster with any driver.

GitHub: https://github.com/M4RC0Sx/rustmy

Docs: https://m4rc0sx.github.io/rustmy/