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)
>>> 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.4.0

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.4.0
File Size Uploaded Provenance Actions
pymongoarrow-0.4.0.tar.gz 30.3 kB Without provenance Details for pymongoarrow-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pymongoarrow 0.4.0
File Actions
pymongoarrow-0.4.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pymongoarrow-0.4.0-cp310-cp310-win_amd64.whl
pymongoarrow-0.4.0-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.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.4.0-cp310-cp310-macosx_10_15_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.15+ x86-64 Details for pymongoarrow-0.4.0-cp310-cp310-macosx_10_15_x86_64.whl
pymongoarrow-0.4.0-cp310-cp310-macosx_10_13_universal2.whl CPython 3.10 CPython 3.10 macOS 10.13+ universal2 (ARM64, x86-64) Details for pymongoarrow-0.4.0-cp310-cp310-macosx_10_13_universal2.whl
pymongoarrow-0.4.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for pymongoarrow-0.4.0-cp39-cp39-win_amd64.whl
pymongoarrow-0.4.0-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.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.4.0-cp39-cp39-macosx_10_15_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.15+ x86-64 Details for pymongoarrow-0.4.0-cp39-cp39-macosx_10_15_x86_64.whl
pymongoarrow-0.4.0-cp39-cp39-macosx_10_13_universal2.whl CPython 3.9 CPython 3.9 macOS 10.13+ universal2 (ARM64, x86-64) Details for pymongoarrow-0.4.0-cp39-cp39-macosx_10_13_universal2.whl
pymongoarrow-0.4.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for pymongoarrow-0.4.0-cp38-cp38-win_amd64.whl
pymongoarrow-0.4.0-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.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.4.0-cp38-cp38-macosx_10_15_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.15+ x86-64 Details for pymongoarrow-0.4.0-cp38-cp38-macosx_10_15_x86_64.whl
pymongoarrow-0.4.0-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for pymongoarrow-0.4.0-cp37-cp37m-win_amd64.whl
pymongoarrow-0.4.0-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.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pymongoarrow-0.4.0-cp37-cp37m-macosx_10_15_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64 Details for pymongoarrow-0.4.0-cp37-cp37m-macosx_10_15_x86_64.whl

Total release size: 158.5 MB

Release files / pymongoarrow-0.4.0.tar.gz

Download URL pymongoarrow-0.4.0.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
328aa5f295820bb5c3dc2d3db2f7a731a5719e56180c32b33a72ec2be5514aa0
BLAKE2b-256 checksum
How to use checksums
7cbde65a94f7dde58cdf32b2b8875990159e51d3e0a751b6c5dad41dc939af1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp310-cp310-win_amd64.whl
Size 7.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
ac953020ed00abda7324c17034816447837e7f5a05ac7e35cb7bb7483a6f044f
BLAKE2b-256 checksum
How to use checksums
f19b305b655767254d86cd525c8989be8d2b37b0fec6213bd087291dc16904a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 15.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
28da95764e2e64ca6395e3aa6341ae4d6c7ad744ca48bc5660df56644ea7f681
BLAKE2b-256 checksum
How to use checksums
81eb620b6d1ca30f0c5c1eb2e195897ea21f8ef21aa7da080415cf80ac2170f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp310-cp310-macosx_10_15_x86_64.whl
Size 10.7 MB
Tags CPython 3.10 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
1377842478a23dbfe1bcecdefc391e7676283a74d8115d4a18258b9a0e07a638
BLAKE2b-256 checksum
How to use checksums
6cfaa1ec2cbba07d7090a543fe5e27e3e613f84742b8a90fa5a96b33737a4252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp310-cp310-macosx_10_13_universal2.whl
Size 10.9 MB
Tags CPython 3.10 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
b5426f4f835ce0826003a228a433c4c96fd81449456d1d5a88d055d219359c20
BLAKE2b-256 checksum
How to use checksums
9ee8ac0e081d10fe793325983b0df5bb6fb467de8ec1435ad0e41ac1893b4d45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp39-cp39-win_amd64.whl
Size 7.6 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
40b8de04718d735ad4296a99c75758436c5601d7684c071635694086fa6bae93
BLAKE2b-256 checksum
How to use checksums
7b57a2692f9b1f1c829d6cc57c5a1e0edac2b4321b8e156555c350fd8f162b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 15.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6897ac0517fdf9ae6e6f83e1b44f63afcc67368133aeafd44527d042c05ab142
BLAKE2b-256 checksum
How to use checksums
cd89a9e33e64f6d536f284bfc4e1d4a983ab74dfa95f6e1132677e21e1d4a959
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp39-cp39-macosx_10_15_x86_64.whl
Size 10.7 MB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
a47351f63002bb18c93ef8c79df3be759e588b231d31a3edb433526fff606f1a
BLAKE2b-256 checksum
How to use checksums
d9119d8f72d60128b2bc9385e5aee21d9a1ba799226c5ed18f53560eac30d435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp39-cp39-macosx_10_13_universal2.whl
Size 10.9 MB
Tags CPython 3.9 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
134744bad918a6f58a2df7fdddabf6ed7e99bd31c93cbfd989efc4c0dd6faf7b
BLAKE2b-256 checksum
How to use checksums
f4ff9470917cad2879e550d9de145c3bfc5dfe401002e0cb5bedaf367085468c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp38-cp38-win_amd64.whl
Size 7.6 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
27251d4222f7e0074d5544e9815a6cb7e88285859365c1164052b81c2e5210fd
BLAKE2b-256 checksum
How to use checksums
efda1671938cd0098344b1dbc6975d519500a95cadc301ca9a40be49bd318332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 15.9 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8867ce3de6fcbce7dbc4d3a6a94f7e7023dd4515860cc7722cde621473ebbaef
BLAKE2b-256 checksum
How to use checksums
73c0605547b31b764b41209e115a0774939f98b7166df581b8c73b1e528ed6e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp38-cp38-macosx_10_15_x86_64.whl
Size 10.7 MB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
e844a2806dbbda5b82db73965ea8158dcce3c6135a9dd38fbaa08cffa2150da2
BLAKE2b-256 checksum
How to use checksums
15b1161d42caa780feb89c4adac3999385d2f91e4f22bb1ff42fb883f0fa76cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp37-cp37m-win_amd64.whl
Size 7.6 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
40e8458e61b6baabc56805dc11d8e72324dcbaedc8e6965fed619db48e574066
BLAKE2b-256 checksum
How to use checksums
7dd906ab96a918f2fa1bb50872cd1350c3b0b01fe084bfeb043cb1ebfb52cce7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 15.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
5a734af0461af3f9bdf2a48e3bd95c66a9e61e1e19b5c13603becff2675dc78f
BLAKE2b-256 checksum
How to use checksums
737db976b048935e54a8049eadf15100964505af4c302192c5515841f313287d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

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

Download URL pymongoarrow-0.4.0-cp37-cp37m-macosx_10_15_x86_64.whl
Size 10.7 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
48eb0cd41bd688d5523710ac91d7077c90f9956c0832af65474e5d0d4422699f
BLAKE2b-256 checksum
How to use checksums
efa94cf3fe11df15f08c24cb3508a7ef5c4b9b609b31289002b0912de50e1e3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

Security for pymongoarrow 0.4.0

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