Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ To install this package simply use pip::
Support / Feedback
==================

For questions, discussions, or general technical support, visit the MongoDB Community Forums.
For questions, discussions, or general technical support, visit the `MongoDB Community Forums <https://developer.mongodb.com/community/forums/tag/python>`_.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a link to this GitHub repository in the reference to 'this GitHub repository' on L48

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

The MongoDB Community Forums are a centralized place to connect with other MongoDB users, ask questions, and get answers.

Bugs / Feature Requests
=======================

Think you’ve found a bug? Want to see a new feature in PyMongoExplain?
Please open an issue on this GitHub repository.
Please open an issue on this `GitHub repository <https://github.com/mongodb-labs/pymongoexplain>`_.

How To Ask For Help
-------------------
Expand Down Expand Up @@ -88,6 +88,8 @@ but using this class to run operations runs explain on them, instead of executin

To run explain on a command, first instantiate an ``ExplainCollection`` from the ``Collection`` object originally used to run the command::

from pymongoexplain import ExplainCollection

collection = client.db.products
explain = ExplainCollection(collection)

Expand Down Expand Up @@ -134,14 +136,23 @@ within the specified script, **in addition to running every command** in the scr
explain output is generated using the `logging <https://docs.python.org/3/library/logging.html>`_ module,
if your script configures logging module there are certain things to keep in mind:

- if your script sets the `logging level <https://docs.python.org/3/library/logging.html#logging-levels>`_
higher than INFO, the explain output will be suppressed entirely.
- if your script sets the `logging level <https://docs.python.org/3/library/logging.html#logging-levels>`_ higher than INFO, the explain output will be suppressed entirely.
- the explain output will be sent to whatever stream your script configures the logging module to send output to.


Any positional parameters or arguments required by your script can be
simply be appended to the invocation as follows::

python3 -m pymongoexplain <path/to/your/script.py> [PARAMS] [--optname OPTS]


Limitations
-----------

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave a blank line after the title.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


This package does not support the fluent `Cursor API <https://pymongo.readthedocs.io/en/stable/api/pymongo/cursor.html>`_,
so if you attempt to use it like so::

ExplainCollection(collection).find({}).sort(...)

Instead pass all the arguments to the find() call, like so::

ExplainCollection(collection).find({}, sort=...)