Tools for using NumPy, Pandas, Polars, and PyArrow with MongoDB
Project description
PyMongoArrow
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
Note: pymongoarrow
is not supported or tested on big-endian systems
(e.g. Linux s390x).
Development Install
See the instructions in the [Contributing Guide][./CONTRIBUTING.md]
Documentation
Full documentation is available on Read the Docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pymongoarrow-1.5.2.tar.gz
.
File metadata
- Download URL: pymongoarrow-1.5.2.tar.gz
- Upload date:
- Size: 59.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b7ba7a31d7f8b5a692bc0e52b5c62ab2d98fc7c6d085b1fb7d66c60b67f21da |
|
MD5 | 9dd6a0916ce79718f7faffed270e004b |
|
BLAKE2b-256 | a48211ac14bacdc29784e211c95ec5ed14f0a95cd94bb45443a32a234d163e50 |
File details
Details for the file pymongoarrow-1.5.2-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 232.1 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e12cccd751187cac8fdf00bd399fb0fceb883573e6086ee7a7f32158bcdeb6b |
|
MD5 | 66a832bd36369534646d303f8f72f609 |
|
BLAKE2b-256 | 6dd7cc59670131ab92e0fdfd438a3ca8a543ca2a50eb0eecc24074e51e24d086 |
File details
Details for the file pymongoarrow-1.5.2-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56507f9b2a5f8b9baad9abec805c06eaad7659d08def6c83fc90f8153b7251e4 |
|
MD5 | 3d4c2cdc8c6aab7b12287e57a536aeb4 |
|
BLAKE2b-256 | fcd39b3eaef71a03cd2d02655a17cf893d040d4d1957a6bbf89a8f666744aeae |
File details
Details for the file pymongoarrow-1.5.2-cp312-cp312-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ed206633da9b34fa090c931d554727e4d192744f6f26cbbddc7776d66ed8629 |
|
MD5 | 9f754cd2e0a87d722feead0db30563a7 |
|
BLAKE2b-256 | 0e6f74182f4803df7acd9eb459841a9568ddfd24bca3c15eb455ea79d62e7ff8 |
File details
Details for the file pymongoarrow-1.5.2-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 259.3 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51aabad66a6583b66154ff9db3366aa108cbd38525ad6065d81ffe87d4f538e7 |
|
MD5 | 5eefe5852287d932bc38f8ee96854d23 |
|
BLAKE2b-256 | e2495ba298f866ce058fccb525d7e36af4cf404b654f18a4085dd757af29d5a6 |
File details
Details for the file pymongoarrow-1.5.2-cp312-cp312-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp312-cp312-macosx_10_15_x86_64.whl
- Upload date:
- Size: 276.7 kB
- Tags: CPython 3.12, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f32228ab37496270e8928a0633288c4ac4bbefaa6614e2b2d5e74b1f90c898d |
|
MD5 | da1ab772f8aeee28c6444ce8b3078216 |
|
BLAKE2b-256 | dfbb33628c233cb5aafcf2c923cac156202e5c302695fd1bb2edfaed977eaace |
File details
Details for the file pymongoarrow-1.5.2-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 236.8 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48a04120e7bab55dea913e230da9e4176c821da5bf129786dfda3c6f251835b4 |
|
MD5 | 5e809716ce35a17bbd3146dc2a73765e |
|
BLAKE2b-256 | a5b5e395aa659b307c617438d7e205d423cf8fdbf440edb1d8e5bc7182d4929c |
File details
Details for the file pymongoarrow-1.5.2-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94f27df45b77f5216de66e0ab774f323e80fb1a4372971e893f505c6e254cb93 |
|
MD5 | 432c4977534b5a4ce4360d66f3d5468a |
|
BLAKE2b-256 | e7a18a7597ee66b8b52ec19d1d4a8070eea9b46ada732838ae2769ce1fdb0c9a |
File details
Details for the file pymongoarrow-1.5.2-cp311-cp311-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df6b57fa6b158d709d842a7e00d819ea0f4a8fe1d29530968d6d013e9380c60d |
|
MD5 | a9b1c2681e6a32e2af923a3b28bcdb22 |
|
BLAKE2b-256 | 5bc68b3db85bfbc79c64e68fe84c8580438774b0b00014d1b6d0fed878debb48 |
File details
Details for the file pymongoarrow-1.5.2-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 259.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20345681ec2a35cfc2e1870d382df6e1aa222b4bdd0b814bb34d80cb2fe075d8 |
|
MD5 | d53f84b9caab6038792e20ffbad4cf02 |
|
BLAKE2b-256 | a9e9ac49d86fd7de7d20d5d8ed9a9bf737b0c42e5773b0c8561f5ac026aea977 |
File details
Details for the file pymongoarrow-1.5.2-cp311-cp311-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp311-cp311-macosx_10_15_x86_64.whl
- Upload date:
- Size: 280.0 kB
- Tags: CPython 3.11, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9f7b54333fde0f02b0f0044b55974e75970ef29aa22fd4b08ca31b0085d5ade |
|
MD5 | 417c046e4c10b87f75898e3db47d6693 |
|
BLAKE2b-256 | ff344e2a63f2cbfebcb4ccb076be4f30ba2f197cdc090f8290093c68213e5149 |
File details
Details for the file pymongoarrow-1.5.2-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 236.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5c3a570c13320513a7d202ebe29b98481d9df598f56f69c08e037edbbafa19a |
|
MD5 | 6294f8e9b4a4bc78a2ee89582324b782 |
|
BLAKE2b-256 | 7cc39487c67527a77aa7ffb9c9a4159ed59b0ec13723c13d4631378ce75c888e |
File details
Details for the file pymongoarrow-1.5.2-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1976967b08018a3959550df775470cb5e798e0aff68eaa4882cee00cbbcbe4c |
|
MD5 | b9d466dc998af81068cfb6fab7cbccc8 |
|
BLAKE2b-256 | 21b8ed1ae2948d7f6ec7ba7abc88b6ba35cee0bc83c0664b448fdeaf376dc4f3 |
File details
Details for the file pymongoarrow-1.5.2-cp310-cp310-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91b48a254cf3121424c5740f0d3c8e5757fd26f32a7e45822d83bd16819b5100 |
|
MD5 | a28a7853ff605d816fbde14c5ff5cf77 |
|
BLAKE2b-256 | 55ac0e0b0b2107512f773f08143cfe1274aa9d3153252babf745693653173851 |
File details
Details for the file pymongoarrow-1.5.2-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 258.5 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67c6ea3c409da035fbf740644985631bd162c05cb9f43b463ad274a13f5c8151 |
|
MD5 | 58970b9b06329660e6adea5082f7cf08 |
|
BLAKE2b-256 | dd2a7782a6aa3070027d0ad6e432671f0e1688a7885cdf0bee20d9a75d868c22 |
File details
Details for the file pymongoarrow-1.5.2-cp310-cp310-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 277.6 kB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56906eb9f89b66aa787f6cfc127a873cf7aa26192e439956a15ecc4cd96ca675 |
|
MD5 | 6d3e99caca50947d8bf89ff447661db3 |
|
BLAKE2b-256 | d3903146c86a18b2468c475335db012511764b59fe4fa33c6f788cbe5bc0d6b2 |
File details
Details for the file pymongoarrow-1.5.2-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 236.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e743554e6c6eb56bc651d1e291e7984d7837fb4c52a32d28ab73e70962143c68 |
|
MD5 | 7df777dcd85a947b54aea2f9e90bddf3 |
|
BLAKE2b-256 | 2a236f44522eb315171df66ae4938fbf5b3660be26ac2b013949710d0f5f80ff |
File details
Details for the file pymongoarrow-1.5.2-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 404fd897b3e8551aabed95baba164383b30691f0817b32d40ea07ee00cfcb20e |
|
MD5 | e64926ec09f770043a242f001af189dd |
|
BLAKE2b-256 | 9a393dab1af17e4ca2454f4c7d4bdd6d1d81957d5afa2a5a0e326541cac0a2cd |
File details
Details for the file pymongoarrow-1.5.2-cp39-cp39-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp39-cp39-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bc471ef6da3211d7c1733acea976c4f5874622ddaad83d1f6ef8094738ecab1 |
|
MD5 | 1ed7826e6078a60196d4070ddcd8f151 |
|
BLAKE2b-256 | 33543914cbadaa1327c6dd97761db78f69f80e2f00f446e628e2bb64a6b92b37 |
File details
Details for the file pymongoarrow-1.5.2-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 280.1 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7593411e65489169671156618a0aca79040df5d9bcfcbf90e4c9d6088fad341e |
|
MD5 | 22e05f017759cf9fec4d1a4c74d4d06b |
|
BLAKE2b-256 | ece4a2344c6cf75f7f27e66de4f76baf0b3edd280f0f6e2225405fc8dd751770 |
File details
Details for the file pymongoarrow-1.5.2-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 296.5 kB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e192a8e90b1f13127bdf864f9cfce7ff7aac40a916227e518c5ef9e470857e3 |
|
MD5 | ebd8663e623a95e42196292220d6b971 |
|
BLAKE2b-256 | 7dec74fe0eca98a5f97bb596f451294450a036c8afc048835da95f1648692524 |
File details
Details for the file pymongoarrow-1.5.2-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 237.6 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74f9cc3373d33427cb6944c64b8db1c9f101641ecd7875d690d50d5c461d5a16 |
|
MD5 | 06936ef07832fb6a3ddd782333c1b438 |
|
BLAKE2b-256 | 8a40b75b9551b6e8e02544f88668a54e1f3a3c6a5da8facef41a18454abd05d0 |
File details
Details for the file pymongoarrow-1.5.2-cp38-cp38-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f9537a3cd938505afbf506f17c95eb2d0ce88dedca09f7d063f70d149330af5 |
|
MD5 | 9c85877676a4e85c0d17c7bfeecb20c1 |
|
BLAKE2b-256 | 98cc02680c16654af8c42833596bdcebd56aba4b2ef3b56f9c4f02f497e33682 |
File details
Details for the file pymongoarrow-1.5.2-cp38-cp38-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp38-cp38-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e20ed6cd391c30cd85851e8355f72672181a91ab7cc817c37c992322a4bfd3aa |
|
MD5 | 7cdb6faf4ca235e258a70b0d0821cfe3 |
|
BLAKE2b-256 | b7014fd5c133739e015fbcf3be251350731611d6d285f1aac1e13b05a4fe24f7 |
File details
Details for the file pymongoarrow-1.5.2-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 281.2 kB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d19f3d95480963a420aa030e34f95adfbfe4a63fb6fd526079c3218b4c22d0 |
|
MD5 | f7a62889f2a13b1a8bb3809dc61f450d |
|
BLAKE2b-256 | 143c64dc22e68666b772a352cd4bd6037c922aa60c247e7d9827ed99c69fbaa0 |
File details
Details for the file pymongoarrow-1.5.2-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: pymongoarrow-1.5.2-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 297.2 kB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17594e6abe572ce972a6c06592aa6ff4b3bef2dacba2e4420ae0b7ca300c985e |
|
MD5 | 2219f4998ab7c07dbd6da87026559914 |
|
BLAKE2b-256 | b396a706caec5de40c96590bf95ebaba9e00da15fda0aa24624cd4de725ee385 |