Skip to main content

PyMongoArrow

Info:

A companion library to PyMongo that makes it easy to move data between MongoDB and Apache Arrow. See GitHub for the latest source.

Documentation:

Available at mongo-arrow.readthedocs.io.

Author:

Prashant Mital

PyMongoArrow is a companion library to PyMongo that contains tools for loading MongoDB query result sets as Apache Arrow tables, Pandas DataFrames or NumPy arrays.

>>> from pymongoarrow.monkey import patch_all
>>> patch_all()
>>> from pymongoarrow.api import Schema
>>> schema = Schema({'_id': int, 'qty': float})
>>> from pymongo import MongoClient
>>> client = MongoClient()
>>> client.db.data.insert_many([{'_id': 1, 'qty': 25.4}, {'_id': 2, 'qty': 16.9}, {'_id': 3, 'qty': 2.3}])
>>> data_frame = client.db.test.find_pandas_all({}, schema=schema)
>>> data_frame
   _id   qty
0    1  25.4
1    2  16.9
2    3   2.3
>>> arrow_table = client.db.test.find_arrow_all({}, schema=schema)
# The schema may also be omitted
>>> arrow_table = client.db.test.find_arrow_all({})
>>> arrow_table
pyarrow.Table
_id: int64
qty: double
>>> ndarrays = client.db.test.find_numpy_all({}, schema=schema)
>>> ndarrays
{'_id': array([1, 2, 3]), 'qty': array([25.4, 16.9,  2.3])}

PyMongoArrow is the recommended way to materialize MongoDB query result sets as contiguous-in-memory, typed arrays suited for in-memory analytical processing applications.

Installing PyMongoArrow

PyMongoArrow is available on PyPI:

$ python -m pip install pymongoarrow

To use PyMongoArrow with MongoDB Atlas’ mongodb+srv:// URIs, you will need to also install PyMongo with the srv extra:

$ python -m pip install 'pymongo[srv]' pymongoarrow

To use PyMongoArrow APIs that return query result sets as pandas DataFrame instances, you will also need to have the pandas package installed:

$ python -m pip install pandas

Development Install

See the instructions on Read the Docs.

Documentation

Full documentation is available on Read the Docs.

Metadata

Release files for pymongoarrow 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymongoarrow 0.5.1
File Size Uploaded Provenance Actions
pymongoarrow-0.5.1.tar.gz 33.7 kB Without provenance Details for pymongoarrow-0.5.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pymongoarrow 0.5.1
File Actions
pymongoarrow-0.5.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pymongoarrow-0.5.1-cp310-cp310-win_amd64.whl
pymongoarrow-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.5.1-cp310-cp310-macosx_10_15_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.15+ x86-64 Details for pymongoarrow-0.5.1-cp310-cp310-macosx_10_15_x86_64.whl
pymongoarrow-0.5.1-cp310-cp310-macosx_10_13_universal2.whl CPython 3.10 CPython 3.10 macOS 10.13+ universal2 (ARM64, x86-64) Details for pymongoarrow-0.5.1-cp310-cp310-macosx_10_13_universal2.whl
pymongoarrow-0.5.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for pymongoarrow-0.5.1-cp39-cp39-win_amd64.whl
pymongoarrow-0.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.5.1-cp39-cp39-macosx_10_15_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.15+ x86-64 Details for pymongoarrow-0.5.1-cp39-cp39-macosx_10_15_x86_64.whl
pymongoarrow-0.5.1-cp39-cp39-macosx_10_13_universal2.whl CPython 3.9 CPython 3.9 macOS 10.13+ universal2 (ARM64, x86-64) Details for pymongoarrow-0.5.1-cp39-cp39-macosx_10_13_universal2.whl
pymongoarrow-0.5.1-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for pymongoarrow-0.5.1-cp38-cp38-win_amd64.whl
pymongoarrow-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.5.1-cp38-cp38-macosx_10_15_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.15+ x86-64 Details for pymongoarrow-0.5.1-cp38-cp38-macosx_10_15_x86_64.whl
pymongoarrow-0.5.1-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for pymongoarrow-0.5.1-cp37-cp37m-win_amd64.whl
pymongoarrow-0.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.5.1-cp37-cp37m-macosx_10_15_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64 Details for pymongoarrow-0.5.1-cp37-cp37m-macosx_10_15_x86_64.whl

Total release size: 219.6 MB

Release files / pymongoarrow-0.5.1.tar.gz

Download URL pymongoarrow-0.5.1.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
af9769212eff79cb061673205b9989dcdc7308baa17a5682331a193b76ed0825
BLAKE2b-256 checksum
How to use checksums
62ec7395701296fc3c0b8ddf000c3583b77341ad70e0c9cb2e97f630b5924656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp310-cp310-win_amd64.whl

Download URL pymongoarrow-0.5.1-cp310-cp310-win_amd64.whl
Size 9.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
27d0477a9bfdc0a320c926e0d9dcb2e32fa18c432ceb123d46f0b000fd23ea44
BLAKE2b-256 checksum
How to use checksums
d12d62f829deb62c90272d35f02ce321fffe6c8c65a7512eef9726e5631b526d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pymongoarrow-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 22.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
310b2d5c0cdeb0ea07b616735d99177ca16bbbd0bdfb9512b479bce7fd606fe3
BLAKE2b-256 checksum
How to use checksums
9d9814ddec06709ecd3460c6d89850131aa0a55d0f5c12f9e0077148a7db7cc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp310-cp310-macosx_10_15_x86_64.whl

Download URL pymongoarrow-0.5.1-cp310-cp310-macosx_10_15_x86_64.whl
Size 14.9 MB
Tags CPython 3.10 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
6b0e9e08f3c6f0f6c9959d2c99b819d18a032b1729a756053e91558780cbe9f6
BLAKE2b-256 checksum
How to use checksums
444ca170a543daba380699379a98120d8888893191021f9c157afdc1b3feac2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp310-cp310-macosx_10_13_universal2.whl

Download URL pymongoarrow-0.5.1-cp310-cp310-macosx_10_13_universal2.whl
Size 15.1 MB
Tags CPython 3.10 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
5a52a304536d11f5e123c67bd9c2008e8e795743221fa64fbdbf305e39d8e2af
BLAKE2b-256 checksum
How to use checksums
fa7673fafeccdd6ee8edfb7e7f7b4fbeeb5913cd59f6c577b7d9509f6966ffa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp39-cp39-win_amd64.whl

Download URL pymongoarrow-0.5.1-cp39-cp39-win_amd64.whl
Size 9.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
fb4520554b61a2c749a628d99af2b4e9ec9a62c18fef7f5173ba434768920a10
BLAKE2b-256 checksum
How to use checksums
9072beaf3158bd8460a2b7d8d1705a5a62cc799ef95bd3dce3f6c68acb429088
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pymongoarrow-0.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 22.6 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bd6c7c5b244964e0d143910a69696fdb574fb2a173ee0edbe249cffa949dc72a
BLAKE2b-256 checksum
How to use checksums
a818f404df98adacedebf8713c3085448764cbf3a28e23f1de3a34a8d208d56d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp39-cp39-macosx_10_15_x86_64.whl

Download URL pymongoarrow-0.5.1-cp39-cp39-macosx_10_15_x86_64.whl
Size 14.9 MB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
9fd2f4dded782af8fcebb7127547b120376724215ba799fb5e79676d46ffd8ef
BLAKE2b-256 checksum
How to use checksums
0e890a159a757f238639a2d633055478aaba6b95ded00dc20f04d23a15006bd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp39-cp39-macosx_10_13_universal2.whl

Download URL pymongoarrow-0.5.1-cp39-cp39-macosx_10_13_universal2.whl
Size 15.1 MB
Tags CPython 3.9 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2b319026e26e5419c84fe69645bf2cd618a878bb86a2850ab91b018d201a091a
BLAKE2b-256 checksum
How to use checksums
045c87c84eb725e66304f649a78bc70c957ddca4d183c806ef7c6524416b629d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp38-cp38-win_amd64.whl

Download URL pymongoarrow-0.5.1-cp38-cp38-win_amd64.whl
Size 9.8 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
04bf90f0c8c80427e202a7a4d7c414abf44bca86dc27f6a28900a27a547aa34e
BLAKE2b-256 checksum
How to use checksums
eb2493554ec8540f510da191f85f1a240b0321cb20e9fb9b8c1a08e80bbf4555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pymongoarrow-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 22.6 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
875181a35ebdecf4bad9ec09ebac328857ac86615192678f99163788c715a3ad
BLAKE2b-256 checksum
How to use checksums
971f03a1026be70b5f0233fd9bcc2b69737f39007ef6658be38a6871dd3c2063
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp38-cp38-macosx_10_15_x86_64.whl

Download URL pymongoarrow-0.5.1-cp38-cp38-macosx_10_15_x86_64.whl
Size 14.9 MB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
bca56ae8ee841e9c3c90eea93395ef05e450b0a73761969cadb9c74d52a179ef
BLAKE2b-256 checksum
How to use checksums
55ff634185baaf3644214224cc7e60f559507b8fdbe259bf9710190ae8df56fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp37-cp37m-win_amd64.whl

Download URL pymongoarrow-0.5.1-cp37-cp37m-win_amd64.whl
Size 9.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
20abe987710272fcc79145ec6f082c7d0647f29873ee9662feef42e59f9e33a6
BLAKE2b-256 checksum
How to use checksums
a462fc376f1037429a8e601d3fa1dd069865fd6c17aa9cef6a1914259b499113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pymongoarrow-0.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 22.6 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
243526540196b60dde7e9f1872889e594f0cf7e298ce2fc78f006148ca9bfb9a
BLAKE2b-256 checksum
How to use checksums
1b5a373ff82e8d52d2433f57fcd84d1215b6586e17ae789cb76359fa95b650d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / pymongoarrow-0.5.1-cp37-cp37m-macosx_10_15_x86_64.whl

Download URL pymongoarrow-0.5.1-cp37-cp37m-macosx_10_15_x86_64.whl
Size 14.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
145f6530f9e27cea12b9f9e7bbc897b46758882e169854921d62e21df965f4bf
BLAKE2b-256 checksum
How to use checksums
cb30ef237e4e24a9f546e7f4cbbbb6d429026fb57597972bbb7b412a14e823b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Security for pymongoarrow 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.1 This release

15 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page