Skip to main content

"Tools for using NumPy, Pandas and PyArrow with MongoDB"

Project description

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

Note: pymongoarrow is not supported or tested on big-endian systems (e.g. Linux s390x).

Development Install

See the instructions on Read the Docs.

Documentation

Full documentation is available on Read the Docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymongoarrow-1.0.0.tar.gz (47.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymongoarrow-1.0.0-cp311-cp311-win_amd64.whl (205.2 kB view details)

Uploaded CPython 3.11Windows x86-64

pymongoarrow-1.0.0-cp311-cp311-manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11

pymongoarrow-1.0.0-cp311-cp311-manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.11

pymongoarrow-1.0.0-cp311-cp311-macosx_11_0_arm64.whl (240.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pymongoarrow-1.0.0-cp311-cp311-macosx_10_14_x86_64.whl (259.0 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

pymongoarrow-1.0.0-cp310-cp310-win_amd64.whl (205.2 kB view details)

Uploaded CPython 3.10Windows x86-64

pymongoarrow-1.0.0-cp310-cp310-manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10

pymongoarrow-1.0.0-cp310-cp310-manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10

pymongoarrow-1.0.0-cp310-cp310-macosx_11_0_arm64.whl (240.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pymongoarrow-1.0.0-cp310-cp310-macosx_10_14_x86_64.whl (258.7 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

pymongoarrow-1.0.0-cp39-cp39-win_amd64.whl (206.1 kB view details)

Uploaded CPython 3.9Windows x86-64

pymongoarrow-1.0.0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9

pymongoarrow-1.0.0-cp39-cp39-manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.9

pymongoarrow-1.0.0-cp39-cp39-macosx_11_0_arm64.whl (241.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

pymongoarrow-1.0.0-cp39-cp39-macosx_10_14_x86_64.whl (260.3 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

pymongoarrow-1.0.0-cp38-cp38-win_amd64.whl (206.2 kB view details)

Uploaded CPython 3.8Windows x86-64

pymongoarrow-1.0.0-cp38-cp38-manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8

pymongoarrow-1.0.0-cp38-cp38-manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.8

pymongoarrow-1.0.0-cp38-cp38-macosx_10_14_x86_64.whl (259.0 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

File details

Details for the file pymongoarrow-1.0.0.tar.gz.

File metadata

  • Download URL: pymongoarrow-1.0.0.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pymongoarrow-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1e5451b4b4dfc376e321a2ae10dbc2bf595344baa3977824eca3cda6b45d0036
MD5 1f4085d2a26765d8764aba3bc2a35571
BLAKE2b-256 66bd86b1c5de24ff235e8295ab38bcd7318aca7eed5eb2055d6808518b3f2ea2

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1f9cb5e19263b5e99fadcac8e8bf5a7b84ee3e21c7897c3970748c0e2fdfc312
MD5 3aec4d145249fc1fbdca56e4a8ab03b1
BLAKE2b-256 a4b226b6edefa3b819188e1cf5cb5ee38faea06c234d50fc6bf470a0daa3b255

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 76f805efd828314a9b55721db734f2049a01b3444438293f88c175cf12a14932
MD5 3adb2b4226765a9c20d5f1a9a4df42a0
BLAKE2b-256 72a3f9902caa7763f5b5986dfc10ba67330eebee0e48af118aac1d0564e19392

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp311-cp311-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a0e0f6e0119364a2bb197e5a59b3d5bb545ee4a8eda1a894911b38a58bba2653
MD5 550f5b0f38449d7514a5373f9b0a7722
BLAKE2b-256 94c477047d597622509b57be186ad81b1ad21727accbf96e79dc912ebcb1647d

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6cdc2421ff9eb8312479f3c759cab2b20f23a964a90085c8bee25171098b28c
MD5 89761ee3994e71912eed6317b6b61af5
BLAKE2b-256 97175683f50d70513cdcb5154fb002e369226417d2e735bbd8454203df49e835

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 286a2a01b2d60e04d7f429f7975a43959c6c4906acfd97a97d31ad29f2846645
MD5 04dc3968ab1d720b4d3fae819f67b326
BLAKE2b-256 552d4ce58e0259e233e10e390c73ca302049c18976b86db21f392b34a7b81ca8

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4eda4595cf9b0419b27460b4ab11a4602f337d4a948edfb69c480c5092e15bcb
MD5 b1eb95d5c1646eb1729b5f0586d4214e
BLAKE2b-256 756b64c5d9bd12d011dac111a6840d66f897e46285cabd76c6a78b4fca51798c

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd8f24ed35c1f8970efd401c15b87c964af8bbcc0ba33a48de1a5e42bc310a6f
MD5 4c5dab228479bdb8fcfbcf16185fbc55
BLAKE2b-256 ea4e9f4617c53c5ebe7fb60ddadfd88865bffb9843a0db504d13847fcb18fa18

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp310-cp310-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 236aea4eb203bf7ba7014ec416f0bb2fb7775424f47b82842d36718450091e99
MD5 1ac4ca6503e9198920c6177628093240
BLAKE2b-256 a6d98309c8b306fb5f31f3649b29d1df901562ba2661bb0e72b850a692cb46dc

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b3aaba976f26726c3f82a6f3f023ec86a59b69df96a1265286f922802677d8e2
MD5 f597c6b835e9c688a0e299fe4082ccfe
BLAKE2b-256 e8bf029642efac58dbcf750309b72e504c721a308059a34e6210f21a5fc499cb

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5a192dc9a1067a763bda55a5a856909ea1318a770e15262a462ddb79a83e6bcc
MD5 b98bee853f16772f596934a21122370d
BLAKE2b-256 5f5886abf3bee6233bfdcd84966085f06da6039750458f069103ffa968151120

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pymongoarrow-1.0.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 206.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pymongoarrow-1.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 df68b9ca581982edee7e8bd3b8d9ea8f4b02d121f55fa66f15ccf3b0c30384f2
MD5 2332945a9476c8e835c644e5c13c48a2
BLAKE2b-256 dd24ebc63d18d9141835849cf5593b22f0ba208970f66d0d02270719861819ed

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 14e9f19f2089aa3259af39c2ef8a40729eb755fe617595636ef246d60dc82885
MD5 46cf9faf8d919d97193115d8d0cafac7
BLAKE2b-256 8c8e4ca4e8088ac2ad2e32d5853e28aac43f3f21ee81f11a2373e4f560143be1

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c57552703efacb1a6781a7dc340483fb7beef42cc4533381260fa8bd1d68c920
MD5 1cd01996b9473428655d4400b35afa1b
BLAKE2b-256 056cd2be3e2ff638131714d0e1aac408aa88b64245f770badc7ef5ff02b4d1f4

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42a486a5eec900cd3c552abb39cf0f26bf26747b4cb0be1d731d0b1259f88011
MD5 fa68e6b4b30bc1950b10c810e672951e
BLAKE2b-256 ea5caa0bcc1005e4bc4653b3dd7c66be37fbc08109235434546a38f2610be614

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7a4dbdd1215d418dd1598dcc3b90f94b5034c4950817e90fd8de16d59ad3a9db
MD5 009ac202c9ccc6338d57412bd2aaf3e1
BLAKE2b-256 1705cbf285a0aa621f150916473d2232121d66750ec59dfd117a820048203df5

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pymongoarrow-1.0.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 206.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pymongoarrow-1.0.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6d229eeab1adba8024abab09407da70042087c4a87f98e3179e5814614f5c39a
MD5 d888212f41e2505b016c7f47386b476d
BLAKE2b-256 bc14cae4451cf988ea88dbbfc0b42a55a77cf5b86a4127fb5f88a613c9850673

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4675118197c562c24ff7241d3a49d7356d2688a81a0af710cbf033cc94491260
MD5 376dcff14c02ebba6eb695a55a2e512d
BLAKE2b-256 478f50d6272ac944c07a190393ee5ba3bbebf359e0d119334298337780acd5d2

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 81c65fc5a656668bf5ee8f2ca60edfc18466e03db8256b29cbe98cae347e70fe
MD5 e84eaf705da309f649732260b767586e
BLAKE2b-256 d5641e1d6f67bd6eabed7f2dec105af4a3bf2080336ddb54f1dedb8c02095a71

See more details on using hashes here.

File details

Details for the file pymongoarrow-1.0.0-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for pymongoarrow-1.0.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 419b7125c02a8773853e99abeb7d3d3c7ab744af5472c62690fb4b883bdc65fe
MD5 ab5f12c65699b25d7c37b5f6c18fab90
BLAKE2b-256 9f0098567b765b0292d550a6934725b94e966a22d66563bab2270d03a8d81f8a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page