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.6.2

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.6.2
File Size Uploaded Provenance Actions
pymongoarrow-0.6.2.tar.gz 35.0 kB Without provenance Details for pymongoarrow-0.6.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pymongoarrow 0.6.2
File Actions
pymongoarrow-0.6.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pymongoarrow-0.6.2-cp310-cp310-win_amd64.whl
pymongoarrow-0.6.2-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.6.2-cp310-cp310-manylinux2014_x86_64.whl
pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.14+ x86-64 Details for pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_x86_64.whl
pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_universal2.whl CPython 3.10 CPython 3.10 macOS 10.14+ universal2 (ARM64, x86-64) Details for pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_universal2.whl
pymongoarrow-0.6.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for pymongoarrow-0.6.2-cp39-cp39-win_amd64.whl
pymongoarrow-0.6.2-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.6.2-cp39-cp39-manylinux2014_x86_64.whl
pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.14+ x86-64 Details for pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_x86_64.whl
pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_universal2.whl CPython 3.9 CPython 3.9 macOS 10.14+ universal2 (ARM64, x86-64) Details for pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_universal2.whl
pymongoarrow-0.6.2-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for pymongoarrow-0.6.2-cp38-cp38-win_amd64.whl
pymongoarrow-0.6.2-cp38-cp38-manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.6.2-cp38-cp38-manylinux2014_x86_64.whl
pymongoarrow-0.6.2-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details for pymongoarrow-0.6.2-cp38-cp38-macosx_10_14_x86_64.whl
pymongoarrow-0.6.2-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for pymongoarrow-0.6.2-cp37-cp37m-win_amd64.whl
pymongoarrow-0.6.2-cp37-cp37m-manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details for pymongoarrow-0.6.2-cp37-cp37m-manylinux2014_x86_64.whl
pymongoarrow-0.6.2-cp37-cp37m-macosx_10_14_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 Details for pymongoarrow-0.6.2-cp37-cp37m-macosx_10_14_x86_64.whl

Total release size: 6.3 MB

Release files / pymongoarrow-0.6.2.tar.gz

Download URL pymongoarrow-0.6.2.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
28d0d2b15a72b612c6533bed2a55d847b8b11500035f595ae7036f36d9f10c3c
BLAKE2b-256 checksum
How to use checksums
e555daf9b4686028c74b3d0fb7ecf2452642d6a7d0fbefd3a7d655cce3fe5d0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

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

Download URL pymongoarrow-0.6.2-cp310-cp310-win_amd64.whl
Size 166.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
6352842ea5a9841b25369c5cd2b25c121ad6469c4be5dd96d3fee9ecd8639aa2
BLAKE2b-256 checksum
How to use checksums
3ff7f92278202e7150468714b022fb243634b61b4d2d3ec80915f49dfaa306ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp310-cp310-manylinux2014_x86_64.whl

Download URL pymongoarrow-0.6.2-cp310-cp310-manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a9cb8760aa218b4e5e64d6e635376fc1f33bf78b1fa2248a76e6ff0f0f2eaf70
BLAKE2b-256 checksum
How to use checksums
d26f7232f0f8094f830528d78a9e36a04a9d5dfa5c98774d134482f2ac8c5d2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_x86_64.whl

Download URL pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_x86_64.whl
Size 198.3 kB
Tags CPython 3.10 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
f9af8595e130028b476be6528b0ac8d79caa956ab2d09d36788bec3824de7773
BLAKE2b-256 checksum
How to use checksums
905b2922b644a570d969c4f6166e579a8d5a18fb1822ab4d0aff49ffd4ff627a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_universal2.whl

Download URL pymongoarrow-0.6.2-cp310-cp310-macosx_10_14_universal2.whl
Size 358.7 kB
Tags CPython 3.10 macOS 10.14+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
205ea2a83ee4edcc921131da368bcb19add00a61740b20f8469a2a29d9d896ba
BLAKE2b-256 checksum
How to use checksums
4988e2357a7ef78fef9c013e32ecdc83bbef60ab04c55ef58c499b784c2ca332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

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

Download URL pymongoarrow-0.6.2-cp39-cp39-win_amd64.whl
Size 166.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
978ffadf0008c3ef86fb2731af4d5b342ca69e394988ad05eefc8a7c47e7a75d
BLAKE2b-256 checksum
How to use checksums
4e7b91cddf7608abb2223797d632d486d8542aff870dd6191291448de299da90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp39-cp39-manylinux2014_x86_64.whl

Download URL pymongoarrow-0.6.2-cp39-cp39-manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
2dc3d2f933525d8aad08693b1645e9321af44b8dc2c13d0fc737dbb8395d9bf8
BLAKE2b-256 checksum
How to use checksums
fe84a3c6a851bab916da6555c6952abe3c6de6390acb661b65710494868cbf4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_x86_64.whl

Download URL pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_x86_64.whl
Size 197.4 kB
Tags CPython 3.9 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
e8e042a69376e530c9a1adbf349c21e0e469eeaee202422394d9b0fbbf0b5e98
BLAKE2b-256 checksum
How to use checksums
c6c4d99e239926082a980c26d281d72c568742e977940d59a93cc6ea8eea9325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_universal2.whl

Download URL pymongoarrow-0.6.2-cp39-cp39-macosx_10_14_universal2.whl
Size 356.9 kB
Tags CPython 3.9 macOS 10.14+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
d347380a423e22d97e1a8cbbc537ac73972241aa241bbf4e42704f59dadaafe3
BLAKE2b-256 checksum
How to use checksums
11bb12f416e64ed064506cd29d7eb8574ef2963fa04f46ebf428e5fb11a3ae74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

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

Download URL pymongoarrow-0.6.2-cp38-cp38-win_amd64.whl
Size 166.6 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
3086fd8295b4ba577eaa65cee844a580924678c723a1c60204f517b38b965fb6
BLAKE2b-256 checksum
How to use checksums
10f80bf8a685c5d8343e875066eb18eceb9bc1359fa8dbfce8151717c858613d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp38-cp38-manylinux2014_x86_64.whl

Download URL pymongoarrow-0.6.2-cp38-cp38-manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e03a890e3b0ac719d67ced3d0ac01f11223300015f952788b211dded223acac9
BLAKE2b-256 checksum
How to use checksums
237bdb574663ae45e6886c6fc340c38c89e24fbd213448a4068b0e5d06a369d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp38-cp38-macosx_10_14_x86_64.whl

Download URL pymongoarrow-0.6.2-cp38-cp38-macosx_10_14_x86_64.whl
Size 196.7 kB
Tags CPython 3.8 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
2379af98d6e3b7c260980f676adde8de544c09531c5980103d0981334e2901bf
BLAKE2b-256 checksum
How to use checksums
b690e3e09321cbbf1c4ea2b20c43f4a4ea473bd5f83fd5b72590dd03e904448a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

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

Download URL pymongoarrow-0.6.2-cp37-cp37m-win_amd64.whl
Size 164.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
5f3ee59d95526133f9fa42c038677cdbbf20656d3ac26c26a8f7a68c5eb5b15f
BLAKE2b-256 checksum
How to use checksums
84683cff66d17da4e5ad97098bb0b133eab75cc70609dae47a0fac1dc9f08ba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp37-cp37m-manylinux2014_x86_64.whl

Download URL pymongoarrow-0.6.2-cp37-cp37m-manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e6189c426c303151f3cd3dc75069d62482c064e96576d239c56f2e5c29f947ec
BLAKE2b-256 checksum
How to use checksums
8d3b709c4fe82a0d720a93b5faebdcbc507bb1c1e7a58a006f43fa5c070dc312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pymongoarrow-0.6.2-cp37-cp37m-macosx_10_14_x86_64.whl

Download URL pymongoarrow-0.6.2-cp37-cp37m-macosx_10_14_x86_64.whl
Size 195.4 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
25310d2e567e2a32cae4acde8ad7749e4eabc0b4ee2d91e7d63e658fa1416017
BLAKE2b-256 checksum
How to use checksums
60c523d903430785800162ae216bf4e25dbf72f268bb102abd2f1bf210e1a5df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Security for pymongoarrow 0.6.2

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.6.2 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