TxMongo¶

TxMongo is an asynchronous MongoDB driver for Python Twisted that implements the wire protocol on non-blocking sockets. The API derives from PyMongo. The project now lives under the Twisted organization on GitHub.
The current release is 26.0.0 (October 2026), which supports Python 3.8+, MongoDB 4.0 to 8.0 and PyMongo up to 4.18.
Currently supports:
- insert_one/insert_many, update_one/update_many, replace_one, delete_one/delete_many and bulk_write
- find, find_one and the find_one_and_* family, with cursors you can iterate with
async for - aggregate, distinct, count_documents and estimated_document_count
- create_index, drop_index, drop_indexes, rename and drop
- client sessions and multi-document transactions
- connection pooling, replica sets, SSL/TLS and authentication
- GridFS
- per-call deadlines and timeouts
Downloads, Documentation and Issues Releases: https://github.com/twisted/txmongo/releases PyPI: https://pypi.org/project/txmongo/ Documentation: https://txmongo.readthedocs.io Source Code: https://github.com/twisted/txmongo Milestones and Planner: https://github.com/twisted/txmongo/milestones Bug / Issue Tracker: https://github.com/twisted/txmongo/issues