Skip to main content

Python driver for MongoDB <http://www.mongodb.org>

Project description

Info:

See the mongo site for more information. See github for the latest source.

Author:

Mike Dirolf

Maintainer:

Bernie Hackett <bernie@10gen.com>

About

The PyMongo distribution contains tools for interacting with MongoDB database from Python. The bson package is an implementation of the BSON format for Python. The pymongo package is a native Python driver for MongoDB. The gridfs package is a gridfs implementation on top of pymongo.

Issues / Questions / Feedback

Any issues with, questions about, or feedback for PyMongo should be sent to the mongodb-user list on Google Groups. For confirmed issues or feature requests, open a case on jira. Please do not e-mail any of the PyMongo developers directly with issues or questions - you’re more likely to get an answer on the list.

Installation

If you have distribute installed you should be able to do easy_install pymongo to install PyMongo. Otherwise you can download the project source and do python setup.py install to install.

Dependencies

The PyMongo distribution is supported and tested on Python 2.x (where x >= 4) and Python 3.x (where x >= 1). PyMongo versions <= 1.3 also supported Python 2.3, but that is no longer supported.

Additional dependencies are:

  • (to generate documentation) sphinx

  • (to auto-discover tests) nose

Examples

Here’s a basic example (for more see the examples section of the docs):

>>> import pymongo
>>> client = pymongo.MongoClient("localhost", 27017)
>>> db = client.test
>>> db.name
u'test'
>>> db.my_collection
Collection(Database(MongoClient('localhost', 27017), u'test'), u'my_collection')
>>> db.my_collection.save({"x": 10})
ObjectId('4aba15ebe23f6b53b0000000')
>>> db.my_collection.save({"x": 8})
ObjectId('4aba160ee23f6b543e000000')
>>> db.my_collection.save({"x": 11})
ObjectId('4aba160ee23f6b543e000002')
>>> db.my_collection.find_one()
{u'x': 10, u'_id': ObjectId('4aba15ebe23f6b53b0000000')}
>>> for item in db.my_collection.find():
...     print item["x"]
...
10
8
11
>>> db.my_collection.create_index("x")
u'x_1'
>>> for item in db.my_collection.find().sort("x", pymongo.ASCENDING):
...     print item["x"]
...
8
10
11
>>> [item["x"] for item in db.my_collection.find().limit(2).skip(1)]
[8, 11]

Documentation

You will need sphinx installed to generate the documentation. Documentation can be generated by running python setup.py doc. Generated documentation can be found in the doc/build/html/ directory.

Testing

The easiest way to run the tests is to install nose (easy_install nose) and run nosetests or python setup.py test in the root of the distribution. Tests are located in the test/ directory.

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

pymongo-2.6.3.tar.gz (324.2 kB view details)

Uploaded Source

Built Distributions

pymongo-2.6.3.win-amd64-py3.3.exe (404.7 kB view details)

Uploaded Source

pymongo-2.6.3.win-amd64-py3.2.exe (407.0 kB view details)

Uploaded Source

pymongo-2.6.3.win-amd64-py2.7.exe (405.7 kB view details)

Uploaded Source

pymongo-2.6.3.win-amd64-py2.6.exe (406.2 kB view details)

Uploaded Source

pymongo-2.6.3.win32-py3.3.exe (371.8 kB view details)

Uploaded Source

pymongo-2.6.3.win32-py3.2.exe (376.9 kB view details)

Uploaded Source

pymongo-2.6.3.win32-py2.7.exe (376.6 kB view details)

Uploaded Source

pymongo-2.6.3.win32-py2.6.exe (377.1 kB view details)

Uploaded Source

pymongo-2.6.3.win32-py2.5.exe (242.9 kB view details)

Uploaded Source

pymongo-2.6.3.win32-py2.4.exe (242.9 kB view details)

Uploaded Source

pymongo-2.6.3-py3.3-win-amd64.egg (364.4 kB view details)

Uploaded Source

pymongo-2.6.3-py3.3-win32.egg (362.6 kB view details)

Uploaded Source

pymongo-2.6.3-py3.3-macosx-10.6-intel.egg (387.4 kB view details)

Uploaded Source

pymongo-2.6.3-py3.2-win-amd64.egg (358.3 kB view details)

Uploaded Source

pymongo-2.6.3-py3.2-win32.egg (356.2 kB view details)

Uploaded Source

pymongo-2.6.3-py3.2-macosx-10.6-intel.egg (381.1 kB view details)

Uploaded Source

pymongo-2.6.3-py2.7-win-amd64.egg (352.6 kB view details)

Uploaded Source

pymongo-2.6.3-py2.7-win32.egg (350.9 kB view details)

Uploaded Source

pymongo-2.6.3-py2.7-macosx-10.8-intel.egg (372.2 kB view details)

Uploaded Source

pymongo-2.6.3-py2.7-macosx-10.7-intel.egg (372.3 kB view details)

Uploaded Source

pymongo-2.6.3-py2.6-win-amd64.egg (353.7 kB view details)

Uploaded Source

pymongo-2.6.3-py2.6-win32.egg (352.1 kB view details)

Uploaded Source

pymongo-2.6.3-py2.6-macosx-10.8-intel.egg (372.8 kB view details)

Uploaded Source

pymongo-2.6.3-py2.6-macosx-10.7-intel.egg (372.9 kB view details)

Uploaded Source

pymongo-2.6.3-py2.5-win32.egg (352.8 kB view details)

Uploaded Source

pymongo-2.6.3-py2.5-macosx-10.8-x86_64.egg (351.4 kB view details)

Uploaded Source

pymongo-2.6.3-py2.5-macosx-10.7-x86_64.egg (351.4 kB view details)

Uploaded Source

pymongo-2.6.3-py2.4-win32.egg (356.2 kB view details)

Uploaded Source

File details

Details for the file pymongo-2.6.3.tar.gz.

File metadata

  • Download URL: pymongo-2.6.3.tar.gz
  • Upload date:
  • Size: 324.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymongo-2.6.3.tar.gz
Algorithm Hash digest
SHA256 cabe1d785ad5db6ed8ff70dcb9c987958fc75400f066ec78911ca3f37184a4e2
MD5 da4a7d6ee47fe30b3978b8805d266167
BLAKE2b-256 08b50d6e3e0995520ba613a303e9d4dd686a61847d4a795bca92c5c35942d8f7

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win-amd64-py3.3.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 de65d36db351352713d69ca20a48f662f136dfc0ace887ceb0c1623f35da6c87
MD5 e83535706ded9393e7f1bbbead205160
BLAKE2b-256 024170f0b89cb91804e1955ec74bd58acb985356233cf715b6a57704984a2d2d

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win-amd64-py3.2.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 69dbf8de0d6b0e7efd8ab4c4005d9e7512a76073bd0f77748882e81cda8c3121
MD5 ce9ae0829b1dd8d8216e53eee86928d6
BLAKE2b-256 7ac92424eaae1f542bc91ebdcbb2701275349127da2d70fdfff437798851f3d4

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 3d3e2f31a7c091483667317a778eca77d89e25b64cac5587d4c18783ff0c39ce
MD5 6b9a4b75d5d47b93c8b87c5ddecc0dd0
BLAKE2b-256 c26bb05dee1b09a93efcbfa4c0813bc25e88da29d8f3a208c541178d8396f8d6

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win-amd64-py2.6.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 addb185f0c52cfceff7062ab9aa31393ce18bc3f70ae985f912c44934115417c
MD5 86f131741d2e6084aefb94a89df1225a
BLAKE2b-256 dbf5043296e484ea2f02210744e5bd2c5b8c493c9fc26c9fb63c08bff5f0e619

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win32-py3.3.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win32-py3.3.exe
Algorithm Hash digest
SHA256 54dbad9b326b5ea3708c8ccc0dcb20a32eba79826fbd850886ce5e433cc47031
MD5 104c18bb332978ad0e8341b1fc216e2f
BLAKE2b-256 c39e618fa4ca299aaf1f3b328760ce453a1d047d445303e3d65a8871bdfe34b1

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win32-py3.2.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win32-py3.2.exe
Algorithm Hash digest
SHA256 6aa9474b3fc24b7ea2b2987f816c2eb2f011fdc57a2b0144ba83ff0dd2395f72
MD5 fe28c066d66bb1e7d6a3da687a31cc46
BLAKE2b-256 cd0decfb7b04a23a3b5e92624284d046ed3e30cdd38b2ec9646318ba34dc2b31

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win32-py2.7.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win32-py2.7.exe
Algorithm Hash digest
SHA256 165168628ff9665c92a4f8e6927c6f31b034435d9f03b4d751b084201d88f017
MD5 771305c13c484041545b6ef0f3270604
BLAKE2b-256 3d544d9b942e1d302682b9376954e5b52888cf58969573f542cdc341d9803767

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win32-py2.6.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win32-py2.6.exe
Algorithm Hash digest
SHA256 dd2e4f9aaf0a7c21e93e02fa71d676310f7c89e9b3ebe8928aef77c5ae944e45
MD5 aa622b01fc12f9f5858871382ab32e65
BLAKE2b-256 867229f4c674560824fa0331fc2c4b821b1e1a839b7b63fca8057331d4a9413f

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win32-py2.5.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win32-py2.5.exe
Algorithm Hash digest
SHA256 d067d0f0dc50485b272172cfeabb82174e1b49df8729b06e7bf7b00e20521672
MD5 3542f0128f5e1c030b35fba79405a250
BLAKE2b-256 b5b6b9e3ba29c3c7ffc103783ecde2bca8d94cfb9adaced005aa24c72312ad75

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3.win32-py2.4.exe.

File metadata

File hashes

Hashes for pymongo-2.6.3.win32-py2.4.exe
Algorithm Hash digest
SHA256 4c7d0d84aa66affe96d5857583a0da84d3da1c01f87e3dcf47b8fda5652d295e
MD5 469537b7fa42cbac1d779d5c309ddcf3
BLAKE2b-256 b6cce3dbef43747826596a15744143166889d5c3d57e28fc3023af197ed6972a

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py3.3-win-amd64.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py3.3-win-amd64.egg
Algorithm Hash digest
SHA256 9ca4ff1a60f8cd6eb2d6e52c7708261212dff846fbf8d1903f8f57a21ef562ae
MD5 b28032921e06c2951b5ef7a83d7ff5d6
BLAKE2b-256 311eefcd95d0c6223069b7724ed28e6506f404b728d3e0314aa50b2ce845c5d6

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py3.3-win32.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py3.3-win32.egg
Algorithm Hash digest
SHA256 f301a7c016e35477e845ac6e5d26a844fc788104509e0f115734ae8b8f4b72d3
MD5 346f88327c2b202e5f10b3216a4611de
BLAKE2b-256 5c07bea2d562114cf06f94857f33c4a9c52165de11e93602525762beb6f662e3

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py3.3-macosx-10.6-intel.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py3.3-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 e53b434c0166d1c801928172f0cc9ddc9f9ddba94590ad733c34b891a38e4488
MD5 e8e619815dc71a20f340e5eb6fa7ac28
BLAKE2b-256 97d7687f9179a86bfb54229c3bcdbb89944a302dff8ee4612823b2f10fe433d5

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py3.2-win-amd64.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 2757edbdc67500544523fa1bace4c750c6ccc879aae9d804ffe99940a7d36ba0
MD5 5da16cef264211bd37a8bf0d68e3ef93
BLAKE2b-256 323967335e637f44c6f32b19e3be576d0186696a57c8d675ac3a0b467b164199

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py3.2-win32.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py3.2-win32.egg
Algorithm Hash digest
SHA256 8297d1f154c4edcd334b00d59cd9790090ff6bf9cebb36a524565f4826d4d1af
MD5 798f391fa664a539f7cdcee64d7b53c5
BLAKE2b-256 6d1d2cfcd57dbe079c7f8f34bfaffd8589e1c468f8d7df287bbe7b50187be994

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py3.2-macosx-10.6-intel.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py3.2-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 cdab06b707bd4a7a160b83e19219e0f6ea21f1c022c8e373443c6a70b4195965
MD5 9ffca77434f72772497af89482cb6242
BLAKE2b-256 45e57fad3c73b6b0791c4fb9ba6f6ce61a6c96de274e728cdf4084e36591e23c

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.7-win-amd64.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 2196b44ec67aaab8b92647e7e11ddc0adfb61c47c9e7e676826adc518d26d07e
MD5 1ef98374f94d2f64f601189e9a83962f
BLAKE2b-256 f8a0ce33fe5d06e69f5234fad4a7ef37315e226a515789a8ad508215d10cb60b

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.7-win32.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.7-win32.egg
Algorithm Hash digest
SHA256 7586f9b48b86eb708c070cbbc3a677a49ea58c645273420695e7eb3b94d76eb0
MD5 94eba5ef001243be86387ddff2a8c04a
BLAKE2b-256 106b439f8cf34f0969e651191579ed9d14fca8cc21bef393d80495fa509bf666

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.7-macosx-10.8-intel.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.7-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 0b04fd2942ccdbea8f0b7c353190c7d3364baa60f78333eb186b360dfa9c198a
MD5 a0bb3a0bfa1cc5c1785b0bcb0d607256
BLAKE2b-256 513469db6fdaabddde3e745312cc69b9d31f61d9ae5dc8fcffaf4fad201de5ea

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.7-macosx-10.7-intel.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.7-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 7f2f6b954be8961c5cc1add2a2e148f0f303b96b16846d4b22c36a68ae8efd38
MD5 6d1cbc346c6a501251abbc239fed3f34
BLAKE2b-256 868a0005695107cc0fdc27dd22175ce7c4b64e71b7888644ced4584e4f335e30

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.6-win-amd64.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 a9d26344f10e659ca1137ccb4e2fb848da9b6d8f60d1ac3c92a82938e5c0096d
MD5 fcea987b409f515551e04bacde28c8b1
BLAKE2b-256 807e198b5c70fa87b87442c1543fb15cfb71ecb00873bb871985e8c2b4675822

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.6-win32.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.6-win32.egg
Algorithm Hash digest
SHA256 f78ab05217a2ca8d80ddc59850caee6ea883b3c2ee9a117ab5cbd56e27677de3
MD5 8a8ee5fa1144aba4bea323958cdc0513
BLAKE2b-256 255434783fcaf1dce20d395d7b61312987da71704a930f2818a828afa22889bb

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.6-macosx-10.8-intel.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.6-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 ba84fdfe435962926e2c1f8e232147bd19497a6e4626e49681a98a55f0f1489d
MD5 a8959f9f1de00860b561a1a0fd5f8542
BLAKE2b-256 2d02d64e956e469fc527944e15d6d27a2c8b811440389aec0157ee9afdab8642

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.6-macosx-10.7-intel.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.6-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 6fc741e066d908a69b10bb14d32c7a9a23fe0bdc60ac092c31fc9259648c6dbe
MD5 dbab93f3748713c35534e20e81973b91
BLAKE2b-256 9e7902c5773b6150d475c8a8bb0664441b49394589cd635d3de1889e4107379f

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.5-win32.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.5-win32.egg
Algorithm Hash digest
SHA256 ef72e246fac730ad0b42d58522adc0c63f7d118864783ac7b55f1548b18c9e7f
MD5 1d945f5a6c0e6966f3aaf341eda85186
BLAKE2b-256 07d958f49c9ba0d682e44ad348dbae2d93dd1fb1afd3ea98f31a8e0343964564

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.5-macosx-10.8-x86_64.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.5-macosx-10.8-x86_64.egg
Algorithm Hash digest
SHA256 479859f8c4d1b1c6c32ba263995e583f758b6b8b7da14cfd94c7c8af863b6f02
MD5 a2c54726a77a041f632d0f873c1a4f08
BLAKE2b-256 83264e280861c10b766a32a91abd4598386262bc499c96c2da707d2c8fbc2306

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.5-macosx-10.7-x86_64.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.5-macosx-10.7-x86_64.egg
Algorithm Hash digest
SHA256 172b2aa031480d6a96acea5e4db871eb98244725f7659190377e7ee9dda39cb0
MD5 9040aa66bd76bddda26758dd3d2ef264
BLAKE2b-256 7cea6d42ce76268065c59da2848fac6cb7df23357a742de84dc380306652e632

See more details on using hashes here.

File details

Details for the file pymongo-2.6.3-py2.4-win32.egg.

File metadata

File hashes

Hashes for pymongo-2.6.3-py2.4-win32.egg
Algorithm Hash digest
SHA256 457eb7e519f614b1885b3387bb4113e37471f57adba2631b7fd35dfd4aedc104
MD5 33b1bf5b3c538f5f2f6fb232af631e2b
BLAKE2b-256 6bfefb8b8cd496315999a8d9a27a7311fb0f4a84999345da4a5c56f0baa37689

See more details on using hashes here.

Supported by

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