Python driver for MongoDB <http://www.mongodb.org>
Project description
- Info:
See the mongo site for more information. See github for the latest source.
- Maintainer:
Bernie Hackett <bernie@mongodb.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.
Support / Feedback
For issues with, questions about, or feedback for PyMongo, please look into our support channels. Please do not email any of the PyMongo developers directly with issues or questions - you’re more likely to get an answer on the mongodb-user list on Google Groups.
Bugs / Feature Requests
Think you’ve found a bug? Want to see a new feature in PyMongo? Please open a case in our issue management tool, JIRA:
Navigate to the PYTHON project.
Click Create Issue - Please provide as much information as possible about the issue type and how to reproduce it.
Bug reports in JIRA for all driver projects (i.e. PYTHON, CSHARP, JAVA) and the Core Server (i.e. SERVER) project are public.
How To Ask For Help
Please include all of the following information when opening an issue:
Detailed steps to reproduce the problem, including full traceback, if possible.
The exact python version used, with patch level:
$ python -c "import sys; print(sys.version)"
The exact version of PyMongo used, with patch level:
$ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"
The operating system and version (e.g. Windows 7, OSX 10.8, …)
Web framework or asynchronous network library used, if any, with version (e.g. Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, …)
Security Vulnerabilities
If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here.
Installation
If you have setuptools 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.
Do not install the “bson” package. PyMongo comes with its own bson package; doing “easy_install bson” installs a third-party package that is incompatible with PyMongo.
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:
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
Built Distributions
Hashes for pymongo-2.8.1.win-amd64-py3.4.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5caa230e1e4909c11e7b8b393272f5a4b6a34fe0a23eceb5440bd5b436927bb9 |
|
MD5 | f6ff6f0883b6b25a911c6d1fccb37433 |
|
BLAKE2b-256 | e35733776c68fbf917ca8da94e1b7c7d4a7a434fea2af2541167ef03a0ec8a0a |
Hashes for pymongo-2.8.1.win-amd64-py3.3.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b3207918c440b5902aeb6777685333cc6ee90c9cd7ac4e2d3852af7dd6c0ba1 |
|
MD5 | 4b7686003c7d58f2bb6acfb79f5ac55d |
|
BLAKE2b-256 | e902451f00bb001e7922d3498098665292798730dca80738212295169c25d1be |
Hashes for pymongo-2.8.1.win-amd64-py3.2.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fb2bde825bcca96d5c434d52b8824bb11ebe51a75769217367f1a329fde06d9 |
|
MD5 | 842a95c56ff00feb1a6a21cf04e08053 |
|
BLAKE2b-256 | 938d0e1b7abee398ea8ebdefb83ca36c5b3bf71d69b833b8b52dea405a72d28e |
Hashes for pymongo-2.8.1.win-amd64-py2.7.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67af837bb71725a7c23af2cab82e80e751f5cc9139b8e62622cceaabc7dcc9f9 |
|
MD5 | 054522bbef96a9768e58978bf3e49b05 |
|
BLAKE2b-256 | 31c1a400bff6f2d3885f63fd7122213da1708fadcb6dff91a5126b8dee50194e |
Hashes for pymongo-2.8.1.win-amd64-py2.6.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11416b752fc0914f1b0c4bd33b1ebe54a3aa8d1c72d9539c1eb49219024e8a30 |
|
MD5 | 61ff9d2969d4d1b971b7805ad414ec4e |
|
BLAKE2b-256 | 92a5bba5fb5bb995bd3e070fae20c5abdfc0e913aed67aab2a46c039ad434538 |
Hashes for pymongo-2.8.1-py3.4-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 715afecf0d3a95e2d3015eb5c02c7d79d95b158a1ce651e4bea86ff00267f1ac |
|
MD5 | 97ab0a553cb88d6225ccf6fcb406a628 |
|
BLAKE2b-256 | fe125e7ec7d1d44d124254bf5356bfe7df0aac91bcd077e499a2a0fabe17f7cb |
Hashes for pymongo-2.8.1-py3.4-macosx-10.6-intel.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7d3fcddf5034818c744e77b9106f4e965f4b85b8244b16a72a2ed6eeab9b49 |
|
MD5 | f51e39822e7adc821483d78dc4779146 |
|
BLAKE2b-256 | dadf3cfafbfb927223661b48f0661bd82417ee3187d9968a00eeec89fa965acc |
Hashes for pymongo-2.8.1-py3.3-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6332feff93ea2acdd0a374899ca1c9ba260d83d2992ecd92f979b4ac35156fec |
|
MD5 | ae9b63104b7dd246cc2c8c81ee48e754 |
|
BLAKE2b-256 | a8545ef2af44f9ee620523cc05648478efdccc2ad85abed893380714f2a3b62e |
Hashes for pymongo-2.8.1-py3.3-macosx-10.6-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7420ca7a1a2bb7172388dee72ac4a16d522f267ddb8a4a5173cdffa6f2793435 |
|
MD5 | 03fa7a749acfa7b31ee170b430f59881 |
|
BLAKE2b-256 | ac425de18d121af1c3343996c55011f11e8ff2ccad0cf428da92f676d009bab1 |
Hashes for pymongo-2.8.1-py3.2-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac354d561c2f70a92b5eaf19e4e7ce5ae03350f341e23f6bcf14a2ebfaade321 |
|
MD5 | 49125d756dfaa512ec3965793c93c8ba |
|
BLAKE2b-256 | 2d043d9d3655722cae00b4d1b33b5ac9a66a5a2fc8867f0ad9bbe2d458a91187 |
Hashes for pymongo-2.8.1-py3.2-macosx-10.6-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | bddc71af332bf6d1cd65e331f995414c2686b20959046364b7cc7103da95f1fe |
|
MD5 | 7a5b60df5a181c26e547ecf3f50f9643 |
|
BLAKE2b-256 | 48e1e97b274b90b6e54310a55f22946eb3933f20b0d7f3258c316fefe1c1b5ba |
Hashes for pymongo-2.8.1-py2.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0dea491a5c32b4615c36f26c1763ffc18a8697060c5e8d3d4258485e7915922 |
|
MD5 | 0bafafcc4bde0f84c431b5ec1b5125c8 |
|
BLAKE2b-256 | 99a930bca053bd2bda51f606d5522d2f1ac5821b26ad431a98864565c20d7e05 |
Hashes for pymongo-2.8.1-py2.7-macosx-10.10-intel.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc0ef4c7a7a0087b9251344da28f659cd282fee8a20f8af079239f3c2138ab56 |
|
MD5 | 8812ff7d5eb1e447d7690df99972150f |
|
BLAKE2b-256 | deea3fec37200b79d3cb0a081856da64b585a8ed0ebbe10b124df26655df2f7e |
Hashes for pymongo-2.8.1-py2.7-macosx-10.9-intel.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeb0393dce284acd484a7658502aa912da5ce9918c724247b57323f1577fb1a1 |
|
MD5 | 9843bf88df645b70e4ab84b9fd09d954 |
|
BLAKE2b-256 | b703e9e14c1531f84e65c06f9c3b3cfdfbac90b2ea9e17c91192b248a46b2f71 |
Hashes for pymongo-2.8.1-py2.7-macosx-10.8-intel.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bd8051c1381191a254a0c9446fbc650463f0918bbd6155ab59c4745959fad17 |
|
MD5 | 8e6ca1252c3f4123969b2dc30299d0a1 |
|
BLAKE2b-256 | 1c0c3b4e3881184344bc8cb374dad4da48464849e389fdf020a8f978c3009ec2 |
Hashes for pymongo-2.8.1-py2.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c4d6efaad633201e8688ce749cb14ef56be82379543b1ecabb263a5797ecbef |
|
MD5 | 528641b9d832e883f6ff1ba282e5dce3 |
|
BLAKE2b-256 | 6a76f0447ea0c60ce60cc379172987cd9722fc0b0d160338c53a2bffded61060 |
Hashes for pymongo-2.8.1-py2.6-macosx-10.10-intel.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4cbec95d57f677185d3e0e3b6f96df5b82484d22f944b2935b6971ee2198cd0 |
|
MD5 | 2df9be4477edf50d93e4cd0b7f29924c |
|
BLAKE2b-256 | c19f0476a0e9ff10f90c22baca7821787b593e8a03138ebc85db1919289b4381 |
Hashes for pymongo-2.8.1-py2.6-macosx-10.9-intel.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 508a5229437311fa1c098b554186455815acc7f7047e85a3b46d94b0f6614919 |
|
MD5 | e363ceaae58a8b20d462980ecabbfcbb |
|
BLAKE2b-256 | 53bbb8b28d184ffedd594fc1c8cf1f3df54b93db7e02afebc547d63eadbd8fab |
Hashes for pymongo-2.8.1-py2.6-macosx-10.8-intel.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcd3af1abd2ea60fe33da7bf7a3e6f0553ca230126348c129ebea525189dbf26 |
|
MD5 | be29c32c938923a979e1e4af12f2b31c |
|
BLAKE2b-256 | fcd02958d3240e17e82eff191c7c8c5a713f6190e03cc05292d60c5f744e17d8 |
Hashes for pymongo-2.8.1-py2.5-macosx-10.9-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f6f632506edc83699f6e193794df13e5233733e145c67bf59710774150943c |
|
MD5 | 63c65f4e660afbafa54f1e93d36e773f |
|
BLAKE2b-256 | 1efe54a42ecc1bda4d3b0ac1fa205e8ad1823963454ae2b4b0273fd5dfb3c581 |
Hashes for pymongo-2.8.1-py2.5-macosx-10.8-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3acc2f06a45108211112b86ecc3d8fcb695d42d9dd3727ade1ac361fb9c898a0 |
|
MD5 | 89960cb1456369809bee6d2ce00188a4 |
|
BLAKE2b-256 | ef79e684231ab0a8e17ca4afed29948cc090716ff26c9425dc82b168e0e86904 |
Hashes for pymongo-2.8.1-cp34-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07b40b69c27a728add45c3de0d4523a2e1370d1d80e40b8a02c4829b04c1d614 |
|
MD5 | 3261fd33d05a150afaf708ac177f5b19 |
|
BLAKE2b-256 | d872dff36a5ba293b059fd5fecec2324661c7454a68084fe042c483ac014d245 |
Hashes for pymongo-2.8.1-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8022c51778309f43954cd3f11c3b2cc6795becb61b3ed953a084ecf95468ff76 |
|
MD5 | f228888911d54df6f14677a22fff7095 |
|
BLAKE2b-256 | 3cc2ab662fda00e50b7661670d5ba8d0338c5537f7d3ee259d646191aea79e23 |
Hashes for pymongo-2.8.1-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76405ecfb20fb7f8bf1d19ef55ee802a2ea6c9bf93a5d15317d7161b30387e62 |
|
MD5 | daaf883c1f915592eb4641fc187dc84e |
|
BLAKE2b-256 | 777da39124709f82d2275df9bbb1ffa44faad48a2d2a7ad9e2eb4c94d4f73fec |
Hashes for pymongo-2.8.1-cp33-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f594a196df0afe073c491fd77a4f60dd28ff8b3fceda28ea503cd4a1a8329cc6 |
|
MD5 | 034c1dc2585cc6b089bad05927591a6c |
|
BLAKE2b-256 | f27295a2cba010e24048856e17097014fb6c42de2f34e7c85063327d8dd41593 |
Hashes for pymongo-2.8.1-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0082d8b3ceba5f2a41b5dd2bf6a4d85128b78a62bf58f6c70a990a2a18c7b37 |
|
MD5 | 520e70bdd9b33e3e1ec4a6019f729a37 |
|
BLAKE2b-256 | 229a2ec5aca0faabfb097d5f089d6874e4b7320e526be850afb31cbeda00bfbe |
Hashes for pymongo-2.8.1-cp33-cp33m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d4a9e39f6877f988e1a3928172dbd8f44e0ab240ca899656daa02c9b22feb55 |
|
MD5 | ce9c7d61641adaa557719688f526fbf9 |
|
BLAKE2b-256 | 14bc78d7057ea1d06b6ca089e135ca260f07120f077dc444d6189d4f4bf30c16 |
Hashes for pymongo-2.8.1-cp32-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b1e42430fc428cdf6cc84991083935b4457b3d9d799e8c0afe8e25f4bb09f41 |
|
MD5 | 593afcd359cf176b97e69c56743964a1 |
|
BLAKE2b-256 | 79b8e4205b6624d68260fc3e3ad3f9cd4d20e2e892ce244b75ae893ada627925 |
Hashes for pymongo-2.8.1-cp32-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39d5009e03a71360441c455c5bb1235cdc769268cbffe770d264719f4ec83260 |
|
MD5 | 6d546e5f11a51850314e1eb55743906d |
|
BLAKE2b-256 | ebd269e39f756f9d826167a19820148cacf183a54be5ae43e34d055f72df2ce6 |
Hashes for pymongo-2.8.1-cp32-cp32m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33f0c00a9fa74eccbd0a14ab84947497c0558a7b42cee1e1bdaf5120c0304b5 |
|
MD5 | d43cf006cef8edc21caa662f11f7e739 |
|
BLAKE2b-256 | 583159ffb1acb01dfe0ed126207a98bf01a4ada8069a796d13423679fe20016a |
Hashes for pymongo-2.8.1-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0af4775dbe3ea2ddd713d3b05382d72a5f01636dcf0fc4f57ca9c3aad8f0d1a3 |
|
MD5 | 5b4874be940b96eb39df7b9e1dce13ab |
|
BLAKE2b-256 | e728dfb1562632247c1f1540d05e33d8c7c8b18f3dc5441cfd25b3e57c23e830 |
Hashes for pymongo-2.8.1-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edb640982a46329e3f8cf1059a416902be987eee68b735b5a721be73a807a414 |
|
MD5 | 0907cdfe465458b6e284a31dda6e667a |
|
BLAKE2b-256 | bb4ab92d719c1a08db840764b1897fdeb9d0e6db081f558317f52b0ed9c3261c |
Hashes for pymongo-2.8.1-cp27-none-macosx_10_10_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5543d290437cb2ce751fc9f65e5ac3f885ddef69ec2d847fc87e6b20ef2851cb |
|
MD5 | 8e0be6f3c4fc9c9adcae906d005d8aec |
|
BLAKE2b-256 | 69e4b9319fe6a4d5ce2c347a05b0319e156896e4e23e8484d4c1d57c872cddac |
Hashes for pymongo-2.8.1-cp27-none-macosx_10_9_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ca277da9aad9f5f651f0140f4a825663d32c1f0ca05fcdfb8ad8183af3ef7ec |
|
MD5 | 4f3d7cd558ef5f2b0ece933b58a2820c |
|
BLAKE2b-256 | bd472f100ae848a982b13bfc5a0ea3debca4dc7055fc225fd09faf9abf890297 |
Hashes for pymongo-2.8.1-cp27-none-macosx_10_8_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4af649115424cc245997086900ea44042bad26ef9c98bcc2eb6ce23da3b6729a |
|
MD5 | ca4a5d2dbf6f912c1526a3f8aebea591 |
|
BLAKE2b-256 | 09b52ccbc0f35943e879b5fa0e79b611e69100ed79b914704de3958b0b972aa1 |
Hashes for pymongo-2.8.1-cp26-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e2cfda8717d949fcb71e116845d75418a94b74468e005bb0f2c33007b5aa74a |
|
MD5 | 51e26910ca50aeae890eccf67de647c5 |
|
BLAKE2b-256 | e44d17c9e8f94b7c0756490566a5ced977e6f9101abdd7439a249fa154fca012 |
Hashes for pymongo-2.8.1-cp26-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc033716d423285adf03f054db01c74c7124d7d15ab075a4bb46730dd44b4dd9 |
|
MD5 | 75b921b4dd9b91e1690892dbe33e1e44 |
|
BLAKE2b-256 | 0c8256f4878f637f0af926d5997942d31911f300e9dfdc0afaba8bd5a00acaf1 |
Hashes for pymongo-2.8.1-cp26-none-macosx_10_10_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7da55be54720da856bb0c44c0e331c0705cb2fdc9287e3bd93b26b5d07693a33 |
|
MD5 | ab57552be77c7a55ecaf7e4953a009a4 |
|
BLAKE2b-256 | f7de254def5eb8ca2aa0dfc0e5d75bfc44df188a0d1312a73587e2313d8c6a70 |
Hashes for pymongo-2.8.1-cp26-none-macosx_10_9_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bef012d9665945ab807e71fa88b1d5257ddb79dff1f9ad7168d30a2254d742d9 |
|
MD5 | 5c88801122a497df43f771e92ca87450 |
|
BLAKE2b-256 | a736db3451e27e372351417fdb525e5738779482dc6e8f9c24035b1e3b01966b |
Hashes for pymongo-2.8.1-cp26-none-macosx_10_8_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f91c765ce02314577c458c9affe13a568434ae8cead50a48845aefdf5d756f3 |
|
MD5 | 7f0359417445adce10fa4b14342fa96a |
|
BLAKE2b-256 | ca998d0027e988604435bcc5ac79e6b1376b0681f93bc052027b196c0730f7a6 |