Python driver for MongoDB <http://www.mongodb.org>
Project description
PyMongo
=======
:Info: See `the mongo site <http://www.mongodb.org>`_ for more information. See `github <http://github.com/mongodb/mongo-python-driver/tree>`_ 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 <http://bsonspec.org>`_ for Python. The ``pymongo``
package is a native Python driver for MongoDB. The ``gridfs`` package
is a `gridfs
<http://www.mongodb.org/display/DOCS/GridFS+Specification>`_
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
<http://jira.mongodb.org>`_. 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
<http://packages.python.org/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 <http://somethingaboutorange.com/mrl/projects/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
<http://somethingaboutorange.com/mrl/projects/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.
.. _sphinx: http://sphinx.pocoo.org/
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
File details
Details for the file pymongo-2.2.tar.gz
.
File metadata
- Download URL: pymongo-2.2.tar.gz
- Upload date:
- Size: 228.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac7952896ecfd5d9b4b9d8bb0077c95a0296ea21374df85e2ca32c237c0be57f |
|
MD5 | 101dd4ae59bdd487f67b3a3968a82c8c |
|
BLAKE2b-256 | 6c5eb66b97657ab365484b56608442c47d3916a23b582b2c62d27d52dafa7f8e |
File details
Details for the file pymongo-2.2.win-amd64-py3.2.exe
.
File metadata
- Download URL: pymongo-2.2.win-amd64-py3.2.exe
- Upload date:
- Size: 359.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e402823d4e79394d4893d429e8018542d015ae74b8310178a99ab128f7ee4cc4 |
|
MD5 | bfcf1bb69f3f1bdb52e1b9126daa237b |
|
BLAKE2b-256 | d1ab154e6e77785739d8e9f3a332bca6efc6d320291419e71b18220482f369c6 |
File details
Details for the file pymongo-2.2.win-amd64-py2.7.exe
.
File metadata
- Download URL: pymongo-2.2.win-amd64-py2.7.exe
- Upload date:
- Size: 358.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16d80a7d8b5c4fbafca4bbc9a6ea23e4b552adb1f316f92445730017b2cf700d |
|
MD5 | 218aaebd88fedb54174793efbbeb8ce6 |
|
BLAKE2b-256 | c66938ef84259fbef404fb3f70f2ece47867c115c7362f750d0b8129a0ed3eab |
File details
Details for the file pymongo-2.2.win-amd64-py2.6.exe
.
File metadata
- Download URL: pymongo-2.2.win-amd64-py2.6.exe
- Upload date:
- Size: 358.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 986774d915de529aa67b185e2921c76de9eaceef0001199d35c65b6479d49bfc |
|
MD5 | e158aeeb509659fe6bc6c05d19f21848 |
|
BLAKE2b-256 | cb13d69c9b1517b32ed9c98cdfee46734ec6a8d883a0daf9d6a2f95c74debe4a |
File details
Details for the file pymongo-2.2.win32-py3.2.exe
.
File metadata
- Download URL: pymongo-2.2.win32-py3.2.exe
- Upload date:
- Size: 329.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2096bf9b258029023ed24753781cf6a9ec3f901a953172f15c0fb6d73f8b4979 |
|
MD5 | bbb4910febf2b095c621acdf2ab07fd8 |
|
BLAKE2b-256 | 0e10ece8601eef624eef948b297aa3b27a9624aed25cbfb08de502c4600f81b2 |
File details
Details for the file pymongo-2.2.win32-py2.7.exe
.
File metadata
- Download URL: pymongo-2.2.win32-py2.7.exe
- Upload date:
- Size: 330.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff03949667d56f75a5a1b7126eb0bcaf8d7f72e08c88adb63f7f0cccd0a81e14 |
|
MD5 | 33374913cd0646cba04302223a3ae246 |
|
BLAKE2b-256 | 0040a7f0854aa5fa838c42b89570de37c3e2f34a8c0a9627b7f3c317e8424f55 |
File details
Details for the file pymongo-2.2.win32-py2.6.exe
.
File metadata
- Download URL: pymongo-2.2.win32-py2.6.exe
- Upload date:
- Size: 330.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c88b6b0753e8f14da2fb1c0d8d7e8112346a1ff174a876306cc0fc96d6f52d70 |
|
MD5 | 0aa60621cb2c52b23a89c0407e16ce59 |
|
BLAKE2b-256 | c04dd642972b15e21ab4bd723b6821aa70b80e9b977c074e77d1cea56ef9429e |
File details
Details for the file pymongo-2.2.win32-py2.5.exe
.
File metadata
- Download URL: pymongo-2.2.win32-py2.5.exe
- Upload date:
- Size: 196.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 042bb9a3101a8d147f2ca46e443ef4d0cec43d4fed6eed9290ed0856e61dccd3 |
|
MD5 | 0ee2e8351a5170ba359747dc1d8c83a5 |
|
BLAKE2b-256 | 925038ae2d86be5401ff99efc4c73c73929cc0527376d7998394849b3821d383 |
File details
Details for the file pymongo-2.2.win32-py2.4.exe
.
File metadata
- Download URL: pymongo-2.2.win32-py2.4.exe
- Upload date:
- Size: 196.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 405bf3e0b6c936c409efe81e939de84cb56bfd6c1b4c91bad2c1858bcc7d949c |
|
MD5 | 8bd52fe502cbcc779cd999c0168f0ba7 |
|
BLAKE2b-256 | d867c6f4f7d2a710a333cf3b6c55f1c4c62841b0381bf23c7440468829a4cac6 |
File details
Details for the file pymongo-2.2-py3.2-win-amd64.egg
.
File metadata
- Download URL: pymongo-2.2-py3.2-win-amd64.egg
- Upload date:
- Size: 262.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 326f6fe112bb1687406857be58748a43176bc15f0323fc1351b7f95284976caf |
|
MD5 | 7a036c40db468db88238fb8d8f868857 |
|
BLAKE2b-256 | 2e0c1a9c0a425dfbfe03058848f41eb96ba9262ef5b262e58b3e464b407ea01a |
File details
Details for the file pymongo-2.2-py3.2-win32.egg
.
File metadata
- Download URL: pymongo-2.2-py3.2-win32.egg
- Upload date:
- Size: 260.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d07131e1dcb1dc5e3da9330ea28459f89e0c76b67d74df21788b84bbf1e3de01 |
|
MD5 | 0da6785aa85cfe9d78777d22eccb79d3 |
|
BLAKE2b-256 | c0d7fc6cd1e25c6d0516ceabad7a2b7ac2fa4679008955605b59cc181753f834 |
File details
Details for the file pymongo-2.2-py3.2-macosx-10.6-intel.egg
.
File metadata
- Download URL: pymongo-2.2-py3.2-macosx-10.6-intel.egg
- Upload date:
- Size: 283.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a8edd8a0719e564b641e09dfb4fe63f221e5315cc9a2867cf704462ced93c2b |
|
MD5 | 1e709eaf13edae19dd5fb132e3ed948b |
|
BLAKE2b-256 | f7632353f8808a93c087b8c3fa08d56118923db024c6e2ebaa8223ea6119dfb1 |
File details
Details for the file pymongo-2.2-py3.2-macosx-10.3-fat.egg
.
File metadata
- Download URL: pymongo-2.2-py3.2-macosx-10.3-fat.egg
- Upload date:
- Size: 280.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbb15d68a8b20f84037424230bdb2f3c104c03b524462d3f3aeab0a96b9a062e |
|
MD5 | a753fcfc7ce66adb2838da5827be67c8 |
|
BLAKE2b-256 | 25e99ccd20809651232c13cecc7f97f9b638c3603f6671d6226cf2058158aacd |
File details
Details for the file pymongo-2.2-py2.7-win-amd64.egg
.
File metadata
- Download URL: pymongo-2.2-py2.7-win-amd64.egg
- Upload date:
- Size: 258.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f27acb9ecfec7f3dce65fed733b6b9688f9de382d4acdd1b3df4ae29922bfcf |
|
MD5 | 334f232fbbdda0b0a674ba1f3f13b935 |
|
BLAKE2b-256 | dc13f39c96b1b152ce8a823b8848d9b80e3cea74098a618ac6f7b395070e101a |
File details
Details for the file pymongo-2.2-py2.7-win32.egg
.
File metadata
- Download URL: pymongo-2.2-py2.7-win32.egg
- Upload date:
- Size: 257.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06b6a2b9efa6a58bf3ebff15fa63f6e92d6c1a2db5c7ba162f113f7e44b8816 |
|
MD5 | 2eb7d52190afaa009cbe62f056a03eae |
|
BLAKE2b-256 | fb751a817cb8813236458d1267c85e588091f630e09983233fcaf01ed3a5b0b2 |
File details
Details for the file pymongo-2.2-py2.7-macosx-10.7-intel.egg
.
File metadata
- Download URL: pymongo-2.2-py2.7-macosx-10.7-intel.egg
- Upload date:
- Size: 274.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6381ae94b8bbb65a0bb5617af87edebecb09506bb46508473195fd21d0856119 |
|
MD5 | 644c4e381f3293bf626364d1dbd6c23e |
|
BLAKE2b-256 | 6a6517bb2ec639fa4adf769297569744fadbeb16cafabe8377709f8a47b1a811 |
File details
Details for the file pymongo-2.2-py2.7-macosx-10.6-intel.egg
.
File metadata
- Download URL: pymongo-2.2-py2.7-macosx-10.6-intel.egg
- Upload date:
- Size: 277.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddf498fe62cfe9418db7b311f073f71c67d5760f9cfcb4915406f948c57fd628 |
|
MD5 | 380c0cc00970faecc630ba3fcd47f98e |
|
BLAKE2b-256 | db00f63497d010c007b4a8a747b4c5a829d178b675d934fbe6474253ed61087c |
File details
Details for the file pymongo-2.2-py2.6-win-amd64.egg
.
File metadata
- Download URL: pymongo-2.2-py2.6-win-amd64.egg
- Upload date:
- Size: 259.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eeb1d2df6454dd409b6822db820d4fec766bdd0a668ad4bebdc9d0784dcb04b |
|
MD5 | f84e3ce061002c4e979c8073270cfd51 |
|
BLAKE2b-256 | dc74b97a392482c16f37171d7b5d1ea532319381214544ad7b1ca9b5de56b40b |
File details
Details for the file pymongo-2.2-py2.6-win32.egg
.
File metadata
- Download URL: pymongo-2.2-py2.6-win32.egg
- Upload date:
- Size: 257.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f52ff961bfbeee9846b8e77cff3f73d2db4e9f40636b8b9b7b07d68c9969aa2e |
|
MD5 | 070ddc34249d123332ce35e53484c06c |
|
BLAKE2b-256 | eefff27a0695044956b94e9a16c2179084f57dc48358c42b8c9b4e9896e9af37 |
File details
Details for the file pymongo-2.2-py2.6-macosx-10.7-intel.egg
.
File metadata
- Download URL: pymongo-2.2-py2.6-macosx-10.7-intel.egg
- Upload date:
- Size: 274.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97f72ee5c68e6f890a612235659b63104193e579eef31c9a31b4aa025bd73bb3 |
|
MD5 | 75124de2efe7c7935a8a5d9ce339bc4b |
|
BLAKE2b-256 | 215b7fceb1301bfa55bc157bad2cbe023ae6aad3f13f0cf456467059d7d4e6ba |
File details
Details for the file pymongo-2.2-py2.6-macosx-10.6-universal.egg
.
File metadata
- Download URL: pymongo-2.2-py2.6-macosx-10.6-universal.egg
- Upload date:
- Size: 293.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb4ca0b3d65530826afbad5a824a9e5be74608b882d86bc65ba0ac29a89158db |
|
MD5 | 35975c17c2e30fdc4054d8680cd34bf6 |
|
BLAKE2b-256 | 0b4010b6fefbd0bbb1ae64af803e049167f68a01c85ac376b6d4df8c8dfd5d51 |
File details
Details for the file pymongo-2.2-py2.5-win32.egg
.
File metadata
- Download URL: pymongo-2.2-py2.5-win32.egg
- Upload date:
- Size: 258.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6baaa71a9f9f2357ec4bdc1096f889f83535f4e43cf9495d7dcfc163e6ad33c0 |
|
MD5 | 1eb5d33a0aed957d86aa07a1d55381a6 |
|
BLAKE2b-256 | a3c17ddc8b1aba2e11b24ebb754704496029be0584b5d236e7968413ede3ba8a |
File details
Details for the file pymongo-2.2-py2.5-macosx-10.7-x86_64.egg
.
File metadata
- Download URL: pymongo-2.2-py2.5-macosx-10.7-x86_64.egg
- Upload date:
- Size: 256.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4eff2154134fbb14676fcd24a6a4c47cc8bb35f386cee7a628bb3aea780361d |
|
MD5 | 41c5bca136a5f05ee5e48ba5258aaff5 |
|
BLAKE2b-256 | ef4d0b38e5148d0bb5610ff628e8bfccca8a09dfc7d54cd538b371a6a2046401 |
File details
Details for the file pymongo-2.2-py2.5-macosx-10.6-i386.egg
.
File metadata
- Download URL: pymongo-2.2-py2.5-macosx-10.6-i386.egg
- Upload date:
- Size: 275.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1282e881f7227d2f90ae4fc42af47092a299f245a5a3de8f7d5e4d36fcbebd2 |
|
MD5 | c4d39bc79301a45d866cb33af463f9b5 |
|
BLAKE2b-256 | a334d31bc2e5c5ec1b0853def61d22016298db50c09bf7c83436ab648232ae55 |
File details
Details for the file pymongo-2.2-py2.4-win32.egg
.
File metadata
- Download URL: pymongo-2.2-py2.4-win32.egg
- Upload date:
- Size: 261.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f463cb4910d55757ed9dc83f7b6aed117859422920716221984499b7eef9929c |
|
MD5 | 82671e06e5dfcb1993be855bc46a1c37 |
|
BLAKE2b-256 | cd0eabbdef7255e7e203d197903b90ad12cd6da9750ea198cbb8dc8d3fd38b09 |