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. If you need to use Python 2.3 please contact us.

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
>>> connection = pymongo.Connection("localhost", 27017)
>>> db = connection.test
>>> db.name
u'test'
>>> db.my_collection
Collection(Database(Connection('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

This version

2.2.1

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.2.1.tar.gz (230.9 kB view details)

Uploaded Source

Built Distributions

pymongo-2.2.1.win-amd64-py3.2.exe (360.1 kB view details)

Uploaded Source

pymongo-2.2.1.win-amd64-py2.7.exe (359.5 kB view details)

Uploaded Source

pymongo-2.2.1.win-amd64-py2.6.exe (359.5 kB view details)

Uploaded Source

pymongo-2.2.1.win32-py3.2.exe (330.5 kB view details)

Uploaded Source

pymongo-2.2.1.win32-py2.7.exe (330.8 kB view details)

Uploaded Source

pymongo-2.2.1.win32-py2.6.exe (330.8 kB view details)

Uploaded Source

pymongo-2.2.1.win32-py2.5.exe (197.1 kB view details)

Uploaded Source

pymongo-2.2.1.win32-py2.4.exe (197.1 kB view details)

Uploaded Source

pymongo-2.2.1-py3.2-win-amd64.egg (263.5 kB view details)

Uploaded Source

pymongo-2.2.1-py3.2-win32.egg (261.9 kB view details)

Uploaded Source

pymongo-2.2.1-py3.2-macosx-10.6-intel.egg (284.5 kB view details)

Uploaded Source

pymongo-2.2.1-py3.2-macosx-10.3-fat.egg (283.7 kB view details)

Uploaded Source

pymongo-2.2.1-py2.7-win-amd64.egg (260.0 kB view details)

Uploaded Source

pymongo-2.2.1-py2.7-win32.egg (258.7 kB view details)

Uploaded Source

pymongo-2.2.1-py2.7-macosx-10.7-intel.egg (275.8 kB view details)

Uploaded Source

pymongo-2.2.1-py2.7-macosx-10.6-intel.egg (278.8 kB view details)

Uploaded Source

pymongo-2.2.1-py2.6-win-amd64.egg (260.4 kB view details)

Uploaded Source

pymongo-2.2.1-py2.6-win32.egg (259.1 kB view details)

Uploaded Source

pymongo-2.2.1-py2.6-macosx-10.7-intel.egg (276.2 kB view details)

Uploaded Source

pymongo-2.2.1-py2.6-macosx-10.6-universal.egg (295.1 kB view details)

Uploaded Source

pymongo-2.2.1-py2.5-win32.egg (260.3 kB view details)

Uploaded Source

pymongo-2.2.1-py2.5-macosx-10.7-x86_64.egg (258.0 kB view details)

Uploaded Source

pymongo-2.2.1-py2.5-macosx-10.6-i386.egg (276.7 kB view details)

Uploaded Source

pymongo-2.2.1-py2.4-win32.egg (263.1 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pymongo-2.2.1.tar.gz
Algorithm Hash digest
SHA256 0a6251742736dd3c80025e701ec97ea1540bc97df26ada7b3bf40ff01daa7032
MD5 b9e9f844208971f42862d5a205cab1c7
BLAKE2b-256 2b5c0d5e977ec431a25a8c8a05f5a1926afd2288e176177f4ea89310de113e06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 c237aba667ffc4f00845400033d0880da8159dd3bd99d51e54f0f19a92c649f9
MD5 f007f68d5f8de467ecc44c3213d769a6
BLAKE2b-256 103cca84486f57ad53d1c611631f55fba1f317ce5c0ab50edc260ec20160bf58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 00f693ebb3dd311f57576b4fa0de6c0a9086aa0548c5017066fcd03e40f3feaf
MD5 7c30b693e6ae38a5f5a5262a04f0fce7
BLAKE2b-256 03ccfbe2169486146aa557716e2c7dd32551d5fcbe5ed123da8d80bffd10b39f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 7e62b24d6cedeaffaeb83617688e76eb48c03a84b9c675a19e07ecf6122b390f
MD5 3659b4c924588071a8c48f2487783087
BLAKE2b-256 14ab1a57636b467f21ccffa864cd28e92b7dbed660e1e0896cb603999bdfc755

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win32-py3.2.exe
Algorithm Hash digest
SHA256 8e56dc2ce41cd8ea51dfe1796af91732fb83ce1201ed5f5da914df85be0a32c3
MD5 471c2ce58c627ff41802ca7171d5a173
BLAKE2b-256 297caf800ab1590cedb91bd435aa932740dd561ae8ee16c0d3a8fa8d126ffd07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win32-py2.7.exe
Algorithm Hash digest
SHA256 0482c379091690ae753a1aebc2a0ebedc830371c0e607d7c7db15256775e79a9
MD5 d2f700869e838e77393596dd293a79c6
BLAKE2b-256 2c228fbdc7d2d89602c1deb7078807a5fe11aa35fa02302e6f92ff0bc3b11a72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win32-py2.6.exe
Algorithm Hash digest
SHA256 536d0a5c3613e69f73f37bf4b031c9640fd8f93c65ce38719cf380b5d53cf66b
MD5 3fa832031407611bc1c35a685102bd31
BLAKE2b-256 7a75d48dc06eb907b2a0d72c5cb0f712967f207c096b1b39e6da2e04cc2c4848

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win32-py2.5.exe
Algorithm Hash digest
SHA256 a5ebb95fda35c3e2e6ab7747eefc57f302f587cd0b7b44d294bfe4e6c94980f1
MD5 5c01bff204b15b8fc610ce5bb640d276
BLAKE2b-256 ce1bb2e13cd485411cc1e8c6d4f98b0fc2536582ad8dac4e22b06586d1c09896

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1.win32-py2.4.exe
Algorithm Hash digest
SHA256 b95497ece206413df4ef2047cdc2a35dbb4a85e3950f5b7a23d31d33f2ba863c
MD5 02a6e5ce42b959d8788f66103b6aaef6
BLAKE2b-256 12fcbe16c334bea19769350e626336fea59a2bb4ea10132c207fcdba7fcf6146

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 2b328175a2f21d96b840b22aac4a18472a793dbdbd19b6501b9cbc04ab542c09
MD5 379711ff44c35b5c6c0edc4711e0f22b
BLAKE2b-256 3bde5e4a73c8768d86ff6a32f2eb055e65918348f83c6d7485055cac813cc3e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py3.2-win32.egg
Algorithm Hash digest
SHA256 53232c5a966f4226f9b67f57526d0e769adef81eab3b9f48c996a1d4d0109d0c
MD5 5a4901c3c33cf7afd14133913e9a0052
BLAKE2b-256 02b99bcbb21ea4961641edd803eddfa2af82bfaf3db01b4dd4b0006a536244bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py3.2-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 51a65e5c725fdf0fbf350c59183816a581eee263444ba4d96b62afbc5705e8a1
MD5 53a2038c98883bfb1836320b173ed766
BLAKE2b-256 e07901879e2b4c9b9c3ef39a6580b030b2e677df81146098ffb1775d0818c30d

See more details on using hashes here.

File details

Details for the file pymongo-2.2.1-py3.2-macosx-10.3-fat.egg.

File metadata

File hashes

Hashes for pymongo-2.2.1-py3.2-macosx-10.3-fat.egg
Algorithm Hash digest
SHA256 aeb73748fa7b66e7f287d7c80bc15e46f123c1efb8416f58ccb7f9c9d47fe32e
MD5 7635ad7f8c9447809a4b061d446f77e3
BLAKE2b-256 98136b6f7971500f429894dd54fb07bf976477bee189b7217ae64dff4abd3188

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 7326e603c308a29d7dd7b4eeb7341dad845c970e2d46d7a1fbb6bbcab18efd8c
MD5 f82d321bcb87e29afe782379722d21da
BLAKE2b-256 00a53ff2f53ebe3ccee0360a15aed2017939cd6c77563928802957fac493a1f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.7-win32.egg
Algorithm Hash digest
SHA256 44a97aba172ce48ab64ac5591f39964b2e224c838daba1d7f7a9b220d25dd677
MD5 a67e8239052911f384fe06e31f589d30
BLAKE2b-256 68cf9c4794ed9a25ade9c76225a75ace424749f4a2cd93afe6c35c950f56c381

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.7-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 8973d0e15621958f21442a2da2816f645498cd64b36c9603336f97bb0d5dddfd
MD5 897adf10e1b2c743508a7c8a7b30785a
BLAKE2b-256 8a6c9002f3cf63bdaa9e88b40bc17a61b0aa5f936ccc34bded33c18c06832838

See more details on using hashes here.

File details

Details for the file pymongo-2.2.1-py2.7-macosx-10.6-intel.egg.

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.7-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 5dcfc6d0adf0b0317137e8500038218c194d9af376b834a8f8a0da1bb104c6ab
MD5 8f23652f624bb3a8d54d33d4d34f7371
BLAKE2b-256 d167d9a3b72e8634a01f8ecde9fc12cb814cfc2e0491cd1f690180104a6dba26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 87af09176470bdbf57af688e7c93deb45b80eb8f5fe319ef76d05819091e2a05
MD5 54455fb1e7af19014dc3d795ffdb5e69
BLAKE2b-256 c9c0a0b2f6b953524f131d382db18924fadc81af928b1882b38519288e1dc6a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.6-win32.egg
Algorithm Hash digest
SHA256 9d3e51f96816e4da5e27eb03a8439c3ab3616f2dccbd46c8f03ce0bf9e68903f
MD5 3bcd61b771858f4ac1056501a1700b76
BLAKE2b-256 720763729c6a18fd56051b55a65b489df9763b315c174dd73ba2d6ba076b8733

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.6-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 125e3b72c3125f131edecbea67284338d21a40de7db6f4af07fc715d7c1f2845
MD5 e846bcf8c0cfd8a3e64524aaac91bcd1
BLAKE2b-256 8902737eaff5de93b49c07ee108bee888fb470add8fcf54432bc432e786a52fd

See more details on using hashes here.

File details

Details for the file pymongo-2.2.1-py2.6-macosx-10.6-universal.egg.

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.6-macosx-10.6-universal.egg
Algorithm Hash digest
SHA256 4aa5ab92ec86c0c9604a2bb827ddd97a4f6aad35bed22bdc39e1f2a2ab5efa33
MD5 ff787aeae25b405b4e05636b47adcce3
BLAKE2b-256 ee1c45e988a63287114241ffefa3594c9e4b886e12c06187042be88f17932ecd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.5-win32.egg
Algorithm Hash digest
SHA256 e34bb0a962ccc47299f97b0f4b36614524445e1301427432c11809c6e2af31db
MD5 b3694dfbb61fea249255ddf84b6f174f
BLAKE2b-256 6887abd13b25632d55caf95a85ae66d45df33abb561876630694cf818859cf05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.5-macosx-10.7-x86_64.egg
Algorithm Hash digest
SHA256 7fcdb472f339a8ae5fa6dc43266dbd797513b0963076f3705737ba011e501fbc
MD5 c7849b9fd733ceae6f0e4fc346319f31
BLAKE2b-256 67b42288bbc902c36a7e5a98f5bf4ea00222b4afb165d64f70c56229a9e93e91

See more details on using hashes here.

File details

Details for the file pymongo-2.2.1-py2.5-macosx-10.6-i386.egg.

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.5-macosx-10.6-i386.egg
Algorithm Hash digest
SHA256 99b68bd19cce7a26235bcad6d08c6675a36953f7ff67af87ac4a1db1bc0f0e70
MD5 a620fdc4d33b4757e9fd91c799374078
BLAKE2b-256 a13cd52c300d4f33c5b043152797a79037a4c74a292847c62cd2b698a2edbfa3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.2.1-py2.4-win32.egg
Algorithm Hash digest
SHA256 6cb8b1208e58a1e7e54c3d2ea1dda6b363ae19cd282623452f1aba00e1068d52
MD5 8a693b4f4dd1eebceb6b4971fb9a0798
BLAKE2b-256 839d4773ea11c94c91d314442ba241bf27388d7bd3241d933d4b9ae5ccee0516

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