agentleFS
MongoDBKnown publishermongodb/mongo-python-driver/AGENTS.md

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

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 3 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the mongodb/mongo-python-driver repository that our weekly crawl found: only 13 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about mongodb/mongo-python-driver

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

8 more on GitHub
  • 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.

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
  1. Very specific:

    Do not edit files in pymongo/synchronous/ or mirrored files in test/ directly: they are generated by just synchro from …

    line 23

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md - PyMongo (mongo-python-driver)

Overview

Official Python driver for MongoDB.

Tech Stack

  • Task runner: just (Justfile at repo root)
  • Linter/formatter: ruff via pre-commit
  • Type checker: mypy (strict)
  • Docs: Sphinx / reStructuredText; use Sphinx docstring format for all docstrings

Never run pip install bson. PyMongo ships its own bson; the PyPI bson package silently breaks things.

Project Structure

  • pymongo/asynchronous/ — async driver (AsyncMongoClient, AsyncCollection, etc.)
  • pymongo/synchronous/ — sync driver (MongoClient, Collection, etc.) generated from pymongo/asynchronous/ using just synchro
  • bson/ — BSON implementation
  • gridfs/ — GridFS API
  • test/asynchronous/ — async test suite
  • test/ — sync test suite (generated from test/asynchronous/ by just synchro) and shared test suite
  • test/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 server

Testing

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.