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

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

Uploaded Source

Built Distributions

pymongo-2.3.win-amd64-py3.2.exe (369.4 kB view details)

Uploaded Source

pymongo-2.3.win-amd64-py2.7.exe (368.1 kB view details)

Uploaded Source

pymongo-2.3.win-amd64-py2.6.exe (368.6 kB view details)

Uploaded Source

pymongo-2.3.win32-py3.2.exe (339.5 kB view details)

Uploaded Source

pymongo-2.3.win32-py2.7.exe (339.4 kB view details)

Uploaded Source

pymongo-2.3.win32-py2.6.exe (339.9 kB view details)

Uploaded Source

pymongo-2.3.win32-py2.5.exe (205.6 kB view details)

Uploaded Source

pymongo-2.3.win32-py2.4.exe (205.6 kB view details)

Uploaded Source

pymongo-2.3-py3.2-win-amd64.egg (283.6 kB view details)

Uploaded Source

pymongo-2.3-py3.2-win32.egg (281.8 kB view details)

Uploaded Source

pymongo-2.3-py3.2-macosx-10.6-intel.egg (305.3 kB view details)

Uploaded Source

pymongo-2.3-py3.2-macosx-10.3-fat.egg (304.1 kB view details)

Uploaded Source

pymongo-2.3-py2.7-win-amd64.egg (278.9 kB view details)

Uploaded Source

pymongo-2.3-py2.7-win32.egg (277.7 kB view details)

Uploaded Source

pymongo-2.3-py2.7-macosx-10.8-intel.egg (295.4 kB view details)

Uploaded Source

pymongo-2.3-py2.7-macosx-10.7-intel.egg (295.8 kB view details)

Uploaded Source

pymongo-2.3-py2.7-macosx-10.6-intel.egg (299.1 kB view details)

Uploaded Source

pymongo-2.3-py2.6-win-amd64.egg (280.0 kB view details)

Uploaded Source

pymongo-2.3-py2.6-win32.egg (278.8 kB view details)

Uploaded Source

pymongo-2.3-py2.6-macosx-10.8-intel.egg (295.9 kB view details)

Uploaded Source

pymongo-2.3-py2.6-macosx-10.7-intel.egg (296.4 kB view details)

Uploaded Source

pymongo-2.3-py2.6-macosx-10.6-universal.egg (316.0 kB view details)

Uploaded Source

pymongo-2.3-py2.5-win32.egg (279.4 kB view details)

Uploaded Source

pymongo-2.3-py2.5-macosx-10.8-x86_64.egg (277.5 kB view details)

Uploaded Source

pymongo-2.3-py2.5-macosx-10.7-x86_64.egg (277.7 kB view details)

Uploaded Source

pymongo-2.3-py2.5-macosx-10.6-i386.egg (297.2 kB view details)

Uploaded Source

pymongo-2.3-py2.4-win32.egg (282.4 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pymongo-2.3.tar.gz
Algorithm Hash digest
SHA256 8e43fdd7ea8e2aa965791af1b6e24186248023c6fde70092d9631b1d9150b1dc
MD5 0d342ad1506f983af671d0b0e0e1efec
BLAKE2b-256 fe6c5cf65618ee2248e264c1825395b16b1a0f3e96349d340db4af04c386ea8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 d2e3de250b3bd10a529595c49869edc469d2028f776f40126665c56c0c06b6d9
MD5 c1b42cff091180c30d9beb1d80c3229c
BLAKE2b-256 571951e5cf1a93deff53212340405e125d2b4fbfd6d827d06b14e722573e37cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 6e42cc026e389ccbdf8dcc299f9922ad30be02fac0677ab03458f50a306b3829
MD5 24292c38e631f3f074d3f5ae3343210e
BLAKE2b-256 65d182df09bd892ae1462d18360f4ecccb3ec21ff6e448422f474ce574aaa162

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 7cd537f12828558d57ff98759abb4884b7433751a75b4a9f1c4052bd1a8d865f
MD5 be9f3ed73cf2eda150d88676719737eb
BLAKE2b-256 aa4c31b3f1c204bd84a72f380e56a80c5f3bb6ec192356c15cc13ddcf22fd9af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win32-py3.2.exe
Algorithm Hash digest
SHA256 86c46a778d53f254c555831e94fdc524bf4b0f8678aa09bff577a79344410fb4
MD5 42290756db68576632876403a8b43c58
BLAKE2b-256 c12f6cf84b488e6fec4f28b8a2146bbef97feefac0be1ef8c0cf3e30e5edec17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win32-py2.7.exe
Algorithm Hash digest
SHA256 1f0d3e1e4f81aca2703e5ba6c28998430501d27b0f34111b8f9f100512f5e38f
MD5 ad632cecd4f18dc9ff7a6cbd8b9c878b
BLAKE2b-256 1e063f16691649db39e4525109499a40e6e1615db6c724937809d79c5a373e77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win32-py2.6.exe
Algorithm Hash digest
SHA256 f11328e0f05fd54be6c7425387648f34d5d6ec3a738b713c3c5e2a5cddd9e899
MD5 8d39005f4f19161479d48947f11f72b2
BLAKE2b-256 574060e945944fefac632607e44ec2d601ef1039b2443478672f5ce21334e85a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win32-py2.5.exe
Algorithm Hash digest
SHA256 9d40ce63aba35d7a293495f388080ca17805d3b3f505f30c9763f668264eed4c
MD5 47c8e4e8fc9f2673c9e8af9b1e32a8dc
BLAKE2b-256 c929b045ed18308756ec9cd5f65650c44a2a066847b68a96b4c2d90d03bf4ed8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3.win32-py2.4.exe
Algorithm Hash digest
SHA256 234ab0fcb07ed605308eca43a7fc1bc7035216f1f43a16ff094a6b9a933508fc
MD5 bcab806cceb1902ab09de4b400760fb4
BLAKE2b-256 232c592a9ea9a8491b278efd097b19272af064161a37c07bebd23d1fd56be5dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 2412f2e2e11a896d10047ff0b7da160716f76ec37682b0aa3412255387b3fb75
MD5 997cf56cbd35361e25566478bf84da01
BLAKE2b-256 7227b5e87232654248252d8ec17c97cd423bd1dd9f8f2f7912a7af46fde37542

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py3.2-win32.egg
Algorithm Hash digest
SHA256 e055c1d93fae6440e52e554ee4ef16a644d7f3bd9c3b239666e2e56ece9b4a71
MD5 620e1238e9d3bf31c6d25b34fe072296
BLAKE2b-256 7d47339eb5265ef4e12ea837b042b6cc7c34b174d37d4ddf91bfe5aa7cb6fcb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py3.2-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 62d88df2cb72fc860e1b02dfbc90ec718986de1babbd014268e5d145af6c9cbd
MD5 a0b2364461697197bfe503745d3fe1dd
BLAKE2b-256 58f61c19df3000ecad7cebddb790cdf48ef24be163f65d3a9cb74ce0e0d22cfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py3.2-macosx-10.3-fat.egg
Algorithm Hash digest
SHA256 57c3bb3a7081d72704864f0d130c93825713b6123ae714feb1dd195dee95b6f9
MD5 6cc3e83c039bb8dba361346f94c7839e
BLAKE2b-256 b577664673f876a0e2d5a85b60c9b150970f4604b3586f0be68f491c912ae686

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 7b7925a12b58bffd71b704a65fb897d9918a665296d9bb945b19c5132da9a59b
MD5 13efd73d546bbc335efa1f279ec14176
BLAKE2b-256 5fc23a0e5900ee231ada82ead2861b8d5c17e4cc80fcd828337a951d70431f00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.7-win32.egg
Algorithm Hash digest
SHA256 db176cff81ba457fc8c8342c63db91c44b87e6086c4732b60de44a32ceb8ddf1
MD5 eb9d9068e9c1a2796524876c8bef6ab5
BLAKE2b-256 cca60f4e2fc8d1005ff40ab1ee8843416e5839465c49d4e844eb43795ffd777f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.7-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 cca01196458724d1c1680f6dcf77c1c56988e1b09b58d205d7545c7941d1d4fd
MD5 739f9d900e5545fb9a5d906e72e06c3c
BLAKE2b-256 e0d7153eb3408dcb8e171ea24a22d6b6e11e040bc7df8c99791f20fb58432b36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.7-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 930d3374781df440698e1a81ab98083155404e0cd886ecea9ad1da3483f15d86
MD5 6bf851530c4d56ff1b18e4c8e5c641f6
BLAKE2b-256 b38921c89efb00760a91a1ddd38efdf21d942f85a9ebb74e65f6117b5ff84d6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.7-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 44f06ce9277eb951c22c266e31427a301920e74e2a3404af39fcea98bbc7c8fc
MD5 ea64f193c91754d22bb77e9170c93743
BLAKE2b-256 d1c153d45c755db85eff8e1cc4f4f26088b803ff095c456428679bc2bf15509f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 83162eb9409772fe0edea461966c8bf946b370cf38e231b3011beafef0e75378
MD5 f8b7f4fd5cde9c42a2060b879fe0c5d7
BLAKE2b-256 9adc1d1b3e2ec587167a3b492c4823d86e978bb8d900d02cabf26f66a98b0658

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.6-win32.egg
Algorithm Hash digest
SHA256 41b56d468b11ed3cf4c8aba5ad1794e655d14ede16abbf135392e8982bf2ecfc
MD5 8f4c1f971157510ecba4f02dc3058113
BLAKE2b-256 031c16e1e240d9120fcbe58f4f1878e460d1265c05b6771cbd7be47261c352d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.6-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 7b8dafbc8d86f52ff62aa384ac4c0c28592f6632a86bdf57d0c674dac1001698
MD5 3175ad0147e6e677e2caca7e1c031c39
BLAKE2b-256 44a3a54a7cf20f12f04c336443490f1bf78a289f5fa8a67d5b1dc1ca964c26c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.6-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 fc0958ae98cff50f90ed6527bbe7d204645868a60a215f5b1c3261c6d691653f
MD5 ddae84d9f4d5681dd0243320a45fe57b
BLAKE2b-256 b17715bbbc318a03fda1cc8157fb4bd8466e0162d8578c7a342f442a56892f93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.6-macosx-10.6-universal.egg
Algorithm Hash digest
SHA256 8fef8293dad49287415067064e03f76df3238d62218d5c9ce2380e25b01b838a
MD5 d390898854b6e6602409ad2078495aca
BLAKE2b-256 4ff299e40c2e8dcdf1c5231c849119cdb73fb6ee148297c37638bfe5cd594edd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.5-win32.egg
Algorithm Hash digest
SHA256 e7fddc19a614a0907a7ded2c2e0e11c1c110e9ab77ea52809e003851ae4040f4
MD5 76cc1c17ebc9759702ad7d32c4a5c28d
BLAKE2b-256 c150b53bbb405a4c0bbb92cf1ca5d4b7fd6247a50a38ef6e5566c7626808bda5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.5-macosx-10.8-x86_64.egg
Algorithm Hash digest
SHA256 d103bcfc4ddbac8aac936f176517af0cc894cf5e9d5c0787a0db1228ae886855
MD5 649b65686140501b6a3ba018440b61dd
BLAKE2b-256 02cb223f912ec86ec6781cddb42d2896eeb1631f11441255daafbee5ff41c452

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.5-macosx-10.7-x86_64.egg
Algorithm Hash digest
SHA256 5bb2271f646ba6710c62e239b3f140de1d9d81ac2b04d3fc5166b4eaa2a5560d
MD5 e60d41c25fa64e84970a7e6ca5627e59
BLAKE2b-256 0c60889635723c9ed14dc6d099cf04d2a2793dcaad96a13e6b76c9a4e0a49816

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.5-macosx-10.6-i386.egg
Algorithm Hash digest
SHA256 c17ab9870ffffd6c8c799b1fde12bfc171cb87687a703f17f1cfed4eb4a5a2e8
MD5 92b88f0317824253689d8e1dbd4a0883
BLAKE2b-256 6272005592f3ab10ce5730b262fba84b4d684e528dec55a826433d911eb68793

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.3-py2.4-win32.egg
Algorithm Hash digest
SHA256 71d5d999633b4e97370cbc2a65be580116f1d9fb796a80fbccc40b0a15d43cd8
MD5 7afa53262d1382145af9dc06ca927e96
BLAKE2b-256 b2c61dce2757e37fa7db54636ab0371f1bdf9c6ab966af85759dd85d3cd22b5d

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