mongodb-labs / mongodb-labs/python-bsonjs

Help using aggregate_raw_results

Open
#56 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
42
Forks
13
Avg merge
22h 15m
Merged PRs (30d)
3

Description

I've been going around in circles a bit trying to understand if this library can be used to speed up decoding an aggregation query.

Or whether after recent pymongo updates its needed at all.

documents = []

cursor = collection.aggregate_raw_batches(
                              pipeline=aggregation_query,
)
while True:
    try:
        documents.extend([x for x in decode_all(cursor.next())])
    except StopIteration:
        break

How would I use bsonjs.dumps instead?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the aggregate_raw_batches and decode_all usage shown in the issue, then check how bsonjs.dumps is intended to handle BSON data. Document whether it can replace the current decoding flow and whether recent PyMongo behavior changes the recommendation. Done means the usage path and any relevant limitations are clearly explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.