pymongoarrow
Tools for using NumPy, Pandas, Polars, and PyArrow with MongoDB
What it is and what it does
PyMongoArrow is a companion library to PyMongo that bridges MongoDB query results into columnar in-memory formats. It extends PyMongo's collection API with methods like find_pandas_all(), find_arrow_all(), and find_numpy_all() to materialize query results directly as Arrow tables, Pandas DataFrames, or NumPy arrays without intermediate serialization steps.
The library is designed for analytical workloads where you need MongoDB data in typed, contiguous-in-memory arrays. It supports optional schema specification for type safety and can infer schemas automatically. Runtime dependencies include pyarrow, pymongo, numpy, and packaging; pandas is optional for DataFrame functionality.
Use it for:
- Export MongoDB query results as Pandas DataFrames for data analysis and machine learning pipelines
- Load MongoDB collections into Apache Arrow tables for efficient columnar processing
- Convert MongoDB documents to NumPy arrays for numerical computing workflows
- Materialize large MongoDB result sets with explicit schema validation for type safety
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyMongoArrow converts MongoDB query results into Apache Arrow tables, Pandas DataFrames, or NumPy arrays for analytical processing.
Yes. PyMongoArrow is actively maintained, has no known vulnerabilities, and solves a specific problem—efficient materialization of MongoDB data into analytical formats. The permissive Apache license and broad platform support (Python 3.10–3.14 on macOS, Linux, Windows) make it a low-risk addition. Install it if you regularly need to move MongoDB query results into Arrow, Pandas, or NumPy for analysis.
Install
pymongoarrow on PyPI
pip
pip install pymongoarrowuv
uv add pymongoarrowpoetry
poetry add pymongoarrowInstalling pymongoarrow
Before you install
Medium install friction due to compiled wheels for multiple Python versions and platforms. Active maintenance with recent release (29 days ago) and ongoing repository activity.
License in practice
Apache License 2.0 (permissive) allows commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely.
Quickstart
pip install pymongoarrow
from pymongoarrow.monkey import patch_all
from pymongo import MongoClient
patch_all()
client = MongoClient()
data_frame = client.db.collection.find_pandas_all({})
Requires MongoDB server connection; pandas optional but needed for DataFrame output; not supported on big-endian systems.
Verify before relying
- Performance characteristics when materializing large result sets into memory
- Schema inference behavior when schema parameter is omitted
- Compatibility with MongoDB Atlas connection strings beyond the documented srv extra
Package facts
| License | Apache License, Version 2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 4 — pyarrow, pymongo, numpy, packaging |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 228,756/month — #9,146 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pymongoarrow-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl; pymongoarrow-1.15.0-cp310-cp310-macosx_11_0_arm64.whl; pymongoarrow-1.15.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pymongoarrow-1.15.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; pymongoarrow-1.15.0-cp310-cp310-win_amd64.whl; pymongoarrow-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl; pymongoarrow-1.15.0-cp311-cp311-macosx_11_0_arm64.whl; pymongoarrow-1.15.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pymongoarrow-1.15.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; pymongoarrow-1.15.0-cp311-cp311-win_amd64.whl; pymongoarrow-1.15.0-cp312-cp312-macosx_10_9_x86_64.whl; pymongoarrow-1.15.0-cp312-cp312-macosx_11_0_arm64.whl; pymongoarrow-1.15.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pymongoarrow-1.15.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; pymongoarrow-1.15.0-cp312-cp312-win_amd64.whl; pymongoarrow-1.15.0-cp313-cp313-macosx_10_9_x86_64.whl; pymongoarrow-1.15.0-cp313-cp313-macosx_11_0_arm64.whl; pymongoarrow-1.15.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pymongoarrow-1.15.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; pymongoarrow-1.15.0-cp313-cp313-win_amd64.whl
Keywords: mongo, mongodb, pymongo, arrow, bson, numpy, pandas, polars
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
pymongoPyMongo is the official MongoDB Python driver,…
permissive · top 1,000 on PyPI
Flask-PyMongoFlask-PyMongo integrates MongoDB database…
permissive · top 15,000 on PyPI
pymongoexplainWraps PyMongo's Collection class to explain…
permissive · top 15,000 on PyPI
pymongo_inmemoryProvides an in-memory MongoDB instance for…
permissive · top 15,000 on PyPI
mongoengineMongoEngine provides an Object-Document Mapper…
permissive · top 5,000 on PyPI
bsonEncodes and decodes BSON (Binary JSON) data…
permissive · top 5,000 on PyPI
mongomockMongomock provides an in-memory mock of MongoDB…
permissive · top 5,000 on PyPI
feather-formatFeather-format provides a Python interface to…
permissive · top 15,000 on PyPI
beanieBeanie is an asynchronous Python…
permissive · top 5,000 on PyPI
curatorbinPackages the MongoDB Curator tool as a Python…
unclear · top 5,000 on PyPI