mongo-python-driver
AGENTS.md4.4k starsChanged 8 months agoApache-2.0View on GitHub
Never run pip install bson. PyMongo ships its own bson; the PyPI bson package silently breaks things. Do not edit files in pymongo/synchronous/ or mirrored files in test/ directly: they are generated by just synchro from pymongo/asynchronous/ and test/asynchronous/. A file in test/ is mirrored if a file of the same name exists in test/asynchronous/. Async functions must not call blocking I/O. New features need integration tests. Bug fixes need regression tests. See .github/copilot-instructions.md for more details.
- Installs packages
Trending
Quiet since September.thin dataabout the whole repository
Who's talking about mongodb/mongo-python-driver
- ansible/ansible“bugfix/postgresql scram passwords”GitHub · Jan 21, 2019 · 3 reactions
- python/typeshed“Creating PyMongo Stubs”GitHub · Nov 30, 2017 · 3 reactions
- SkyyRoseCo/DevSkyy“deps(python)(deps-dev): bump the dev-dependencies group with 6 updates”GitHub · Sep 14, 2026 · 2 reactions
- klassiik/monconbuild“chore(deps)(deps): bump pymongo from 4.10.1 to 4.17.0 in /backend”GitHub · Jul 27, 2026 · 2 reactions
- Army161/MoltForge“Bump pymongo from 4.5.0 to 4.6.3 in /backend in the pip group across 1 directory”GitHub · May 12, 2026 · 2 reactions
The biggest 5 of 13 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 13
Talked about on GitHub (13 times).
On GitHub · 13
- Jan 21, 2019bugfix/postgresql scram passwords — ansible/ansible3 reactions · 55 comments
- Nov 30, 2017Creating PyMongo Stubs — python/typeshed3 reactions · 8 comments
- Sep 14, 2026deps(python)(deps-dev): bump the dev-dependencies group with 6 updates — SkyyRoseCo/DevSkyy2 reactions · 3 comments
- Jul 27, 2026chore(deps)(deps): bump pymongo from 4.10.1 to 4.17.0 in /backend — klassiik/monconbuild2 reactions · 5 comments
- May 12, 2026Bump pymongo from 4.5.0 to 4.6.3 in /backend in the pip group across 1 directory — Army161/MoltForge2 reactions · 1 comment
8 more on GitHub
- Apr 25, 2026chore(deps): bump the minor-and-patch group across 1 directory with 39 updates — CodeWizarz/spec-flow2 reactions · 2 comments
- Apr 11, 2026chore(deps): bump the minor-and-patch group across 1 directory with 40 updates — CodeWizarz/spec-flow2 reactions · 4 comments
- Apr 4, 2026chore(deps): bump the minor-and-patch group across 1 directory with 39 updates — CodeWizarz/spec-flow2 reactions · 4 comments
- Mar 28, 2026chore(deps): bump the minor-and-patch group across 1 directory with 38 updates — CodeWizarz/spec-flow2 reactions · 4 comments
- Mar 21, 2026chore(deps): bump the minor-and-patch group in /apps/api with 37 updates — CodeWizarz/spec-flow2 reactions · 4 comments
- Jan 27, 2026Bump the pip group across 1 directory with 5 updates — hoanganh-hue/hehe2 reactions · 1 comment
- Aug 7, 2025chore(deps-dev): bump pymongo from 4.7.3 to 4.14.0 — langfuse/langfuse-python2 reactions · 1 comment
- Jul 14, 2023Maintain one to one match with original Mongo code — py-bson/bson2 reactions · 7 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Do not edit files in pymongo/synchronous/ or mirrored files in test/ directly: they are generated by just synchro from …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md - PyMongo (mongo-python-driver)
Overview
Official Python driver for MongoDB.
Tech Stack
- Task runner:
just(Justfile at repo root) - Linter/formatter:
ruffvia pre-commit - Type checker:
mypy(strict) - Docs: Sphinx / reStructuredText; use Sphinx docstring format for all docstrings
Never run
pip install bson. PyMongo ships its ownbson; the PyPIbsonpackage silently breaks things.
Project Structure
pymongo/asynchronous/— async driver (AsyncMongoClient, AsyncCollection, etc.)pymongo/synchronous/— sync driver (MongoClient, Collection, etc.) generated frompymongo/asynchronous/usingjust synchrobson/— BSON implementationgridfs/— GridFS APItest/asynchronous/— async test suitetest/— sync test suite (generated fromtest/asynchronous/byjust synchro) and shared test suitetest/unified_format/— cross-driver spec tests (Unified Test Format)
Do not edit files in pymongo/synchronous/ or mirrored files in test/ directly: they are generated by just synchro from pymongo/asynchronous/ and test/asynchronous/.
A file in test/ is mirrored if a file of the same name exists in test/asynchronous/.
Commands
just install # set up venv + pre-commit hooks
just typing # type check
just lint-manual # pre-commit linting and synchro
just synchro # generate synchronous driver and mirrored tests
just test # run all tests
just test test/asynchronous # run async tests
MONGODB_VERSION=8.0 just run-server # start a local MongoDB 8.0 serverTesting
Tests require a live MongoDB server (just run-server above).
Async functions must not call blocking I/O.
New features need integration tests. Bug fixes need regression tests.
Commit and PR Conventions
- Prefix commits and PR titles with the JIRA ticket:
PYTHON-1234 Fix retryable write on mongos - Backport PRs: append the target branch in brackets —
PYTHON-1234 [v4.9] Fix retryable write - Merge via Squash and Merge only
See .github/copilot-instructions.md for more details.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

