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
>>> connection = pymongo.MongoClient("localhost", 27017)
>>> db = connection.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

This version

2.4

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

Uploaded Source

Built Distributions

pymongo-2.4.win-amd64-py3.3.exe (381.0 kB view details)

Uploaded Source

pymongo-2.4.win-amd64-py3.2.exe (383.2 kB view details)

Uploaded Source

pymongo-2.4.win-amd64-py2.7.exe (381.9 kB view details)

Uploaded Source

pymongo-2.4.win-amd64-py2.6.exe (382.4 kB view details)

Uploaded Source

pymongo-2.4.win32-py3.3.exe (348.3 kB view details)

Uploaded Source

pymongo-2.4.win32-py3.2.exe (353.3 kB view details)

Uploaded Source

pymongo-2.4.win32-py2.7.exe (353.1 kB view details)

Uploaded Source

pymongo-2.4.win32-py2.6.exe (353.7 kB view details)

Uploaded Source

pymongo-2.4.win32-py2.5.exe (219.4 kB view details)

Uploaded Source

pymongo-2.4.win32-py2.4.exe (219.4 kB view details)

Uploaded Source

pymongo-2.4-py3.3-win-amd64.egg (317.3 kB view details)

Uploaded Egg

pymongo-2.4-py3.3-win32.egg (315.7 kB view details)

Uploaded Egg

pymongo-2.4-py3.3-macosx-10.6-intel.egg (339.1 kB view details)

Uploaded Egg

pymongo-2.4-py3.3-macosx-10.5-fat.egg (338.4 kB view details)

Uploaded Egg

pymongo-2.4-py3.2-win-amd64.egg (311.8 kB view details)

Uploaded Egg

pymongo-2.4-py3.2-win32.egg (310.0 kB view details)

Uploaded Egg

pymongo-2.4-py3.2-macosx-10.6-intel.egg (333.6 kB view details)

Uploaded Egg

pymongo-2.4-py3.2-macosx-10.3-fat.egg (332.5 kB view details)

Uploaded Egg

pymongo-2.4-py2.7-win-amd64.egg (306.8 kB view details)

Uploaded Egg

pymongo-2.4-py2.7-win32.egg (305.5 kB view details)

Uploaded Egg

pymongo-2.4-py2.7-macosx-10.8-intel.egg (323.3 kB view details)

Uploaded Egg

pymongo-2.4-py2.7-macosx-10.7-intel.egg (323.8 kB view details)

Uploaded Egg

pymongo-2.4-py2.7-macosx-10.6-intel.egg (326.9 kB view details)

Uploaded Egg

pymongo-2.4-py2.6-win-amd64.egg (307.9 kB view details)

Uploaded Egg

pymongo-2.4-py2.6-win32.egg (306.7 kB view details)

Uploaded Egg

pymongo-2.4-py2.6-macosx-10.8-intel.egg (323.9 kB view details)

Uploaded Egg

pymongo-2.4-py2.6-macosx-10.7-intel.egg (324.4 kB view details)

Uploaded Egg

pymongo-2.4-py2.6-macosx-10.6-universal.egg (344.0 kB view details)

Uploaded Egg

pymongo-2.4-py2.5-win32.egg (307.3 kB view details)

Uploaded Egg

pymongo-2.4-py2.5-macosx-10.8-x86_64.egg (305.5 kB view details)

Uploaded Egg

pymongo-2.4-py2.5-macosx-10.7-x86_64.egg (305.6 kB view details)

Uploaded Egg

pymongo-2.4-py2.5-macosx-10.6-i386.egg (325.1 kB view details)

Uploaded Egg

pymongo-2.4-py2.4-win32.egg (310.4 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for pymongo-2.4.tar.gz
Algorithm Hash digest
SHA256 11d6a2934188eea6a6b6c55f3a0b1ac610175e6de92b0e5632bb8d90acb3d48d
MD5 22ec839a63f2bb2dc1bfdaea02edc42c
BLAKE2b-256 d561a582b92d8cbb45c41f82fbdf3497cf54022500d9a7438a0117600059296c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 0a17520bdbadd406465ced1fb729acb8bebba10ba84c6e73a2011e87d99ca83f
MD5 82088aeda868c39e057dda4f365bc715
BLAKE2b-256 3a69c3f2072cc5fcec949a333d99f26e66f79299cde8d1a493a3c59a99b8acd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 c9d2d221a32c2314f7a20e01d3043dde4f91b912197f1ab8deb87213824c4b1d
MD5 f126ace4ef4cd1c71e53cc79e2cffaa6
BLAKE2b-256 6d350cfaca000fb43b80c497808d8efa4e5432261120a5f1e581b8110388f32d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 cfae8638a3a41b7de72c1a8552cad82031522732bfedd6f51955c20d3d978509
MD5 ce79cbf4e84ea17e349c4300dd7b336e
BLAKE2b-256 be269b94e29d427efc9454c8206e06c22f9b718aa3f9dae60c213e696327ef29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 eeab9494de72ce61ad87483b048a1f8bddef5eb653a539e7356136773902fc56
MD5 d81a13fb944e20d5b62571cf4cde03d1
BLAKE2b-256 293bf1de1081327c53850f382efb718c9ee54ab0b7e6eb0a3830d75f56613125

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win32-py3.3.exe
Algorithm Hash digest
SHA256 f4c101c05e00f96a7a22169f9379c86f4ce38f27f165f448c00c0aec0e33f29d
MD5 b37619b864f749d8d1b064c9837d3cda
BLAKE2b-256 d65cbe665e0890fad95a11dfc7f92c6a54b99d9d250ff844356f2bceeceb4009

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win32-py3.2.exe
Algorithm Hash digest
SHA256 393d214e4bd4364644cf734b00d4c2b8f0ee00ea4291cd7995f6e275a031cf3f
MD5 2a966d1c2f6c62a27529a2acc39c4249
BLAKE2b-256 aa50e3a6c80ddae1746f1c21d463b13500f6b41bc6cf612e52db90bb40c0af9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win32-py2.7.exe
Algorithm Hash digest
SHA256 7cc42f9192b51db5614e1056e5ac9920106c8904859b3d8e699216efef769038
MD5 1e6af6ed90806ce37c5dbeee14a90fb5
BLAKE2b-256 18c7325d1e08061aecf3232e3a5d43cabbbc8fd56d6b6deb2cd1d7e7ff28f412

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win32-py2.6.exe
Algorithm Hash digest
SHA256 51201ed43af57b5cefef0542f34594b6e732b9fb47b77e554115690672ea5ef4
MD5 c782fbd34265f9ccffd2b1913bb1f701
BLAKE2b-256 c689542946e4f4cec18dbb79651632ad70f9b52ec8065fb676c690567aab5eb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win32-py2.5.exe
Algorithm Hash digest
SHA256 41a5b358caef2383fc7ecfd2382c83fa590aa2c14cc45a946023d7b51fbc38a2
MD5 2013fc9dd00dbe2a541145c216957e31
BLAKE2b-256 cff92ed99f0913a366107e8bdc46998eb60ac70cd26c17aea2b798fabd27f7a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4.win32-py2.4.exe
Algorithm Hash digest
SHA256 861de0086ba8473bcc76fc57febaf5e36c0f0ecd9b4bda29feeab540cf78fad9
MD5 30e2a57b56ce1926b5844463f6f13753
BLAKE2b-256 f0c08e1bffe3783766e91f7d673069057fd3ef1d7755ac47a8504910e681d67a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py3.3-win-amd64.egg
Algorithm Hash digest
SHA256 3aaaebd902ffbed528d668c169dd3b2c0ef305d60d7f2a30c2ef44260b55f957
MD5 e24bc1b7aff746e3ef768d44111d5dbc
BLAKE2b-256 a0bfd5cd9cf0d1eccb07033cc3b083da4819292cb22264ee83cd7d32beadfa96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py3.3-win32.egg
Algorithm Hash digest
SHA256 0e5432816d00d3c4a9cddf7720fb87ce110afe9dd496d2d040ee6af14f4d12f1
MD5 8738c01ee062945e647fad69246a2805
BLAKE2b-256 4f2c622347881e81699a9e02694299eb3b4c3c209a9b941554ba38cc16fe2bee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py3.3-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 a430c141f641cd280325d0fc69031422b9e08731f22a6367c33cf6a2698907d5
MD5 8d168f65cc2fef92384064eeb37546a0
BLAKE2b-256 9bf4a574bee3725a15449010b791850ed77b103051aeb800ee4ec561eb2a7b4e

See more details on using hashes here.

File details

Details for the file pymongo-2.4-py3.3-macosx-10.5-fat.egg.

File metadata

File hashes

Hashes for pymongo-2.4-py3.3-macosx-10.5-fat.egg
Algorithm Hash digest
SHA256 bcfdbaaab02e3bcf86df4d416c77de7a75ab516cc418020e5592a2096b6e5b9a
MD5 d389fa7afbd2f0ec935b0898cc8054fc
BLAKE2b-256 158add03e0f8e6e10af490bb56726c9f37c4ed854dfdac437657de2504369506

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 813557eaf5d9513d2eb4cf107c6b53d1f09098e94da6332cdf30c589e80b69f2
MD5 a39a629acc508f6f0b46c8c62021e08a
BLAKE2b-256 acb3c6e032ca7f014074f85a4ed79aa414870f4334068a534b75f923b9185c3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py3.2-win32.egg
Algorithm Hash digest
SHA256 0b29bdd9785666006f76c0899e988c8d2cb41014160db58e89d3b3b7531b089f
MD5 c433c3c2afb4535fe2ac0b4974e69628
BLAKE2b-256 585477f36337f7ca63a43d7051099004901744edb9cd9963332a6de69955ec6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py3.2-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 4093375b89c46d5ad73cdf05503d79c8da12e5318542784762563823d88874f4
MD5 a0fee42736955997255383e7e4f2287f
BLAKE2b-256 b0ca13d329f6fe19dacc15e5c4416128a647d4dbc8beb2efba0191972ffceb06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py3.2-macosx-10.3-fat.egg
Algorithm Hash digest
SHA256 53f130117137e16541af26f68072ce8bc02cf6bacc1c694e7c05becdb867fe6a
MD5 0344a8a0ed851214e8f20c379dff46f6
BLAKE2b-256 a9cfe3287fa9b7ceefa1b4cd5d41a79b45d4b181d3c4fcde7e47fb477f700a5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 ff982cf49e83131719fe64651e8a2a0f3a0899a67afd7600fe5a8fa23262b551
MD5 0657fd9425a5b9bab3ba3c39461dbc71
BLAKE2b-256 421789a4a7f9482950e7b9318e2a48cc6f12377c20fee527b82ec7bd60a8b84c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.7-win32.egg
Algorithm Hash digest
SHA256 d279dc8784c8f25b6e413cc96762e95ca196f7619317c42f081e1771659f443d
MD5 dc122efed9af36c5f44fd9df2b57a4f5
BLAKE2b-256 e86b72a127530dce19faead742a4706bee10780d7889ecb85edca0032eccd395

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.7-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 4887b6d2ff3f1e756ba596f771839f1fe79f4f5320c22c1f66f08cf891c0cb62
MD5 d4c08285c3bcc3ba2dd80db1ec67a6f7
BLAKE2b-256 04bca287904b4c28a696ddbc60165ab7275f3df390b44f0bf68ba3c49edd036c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.7-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 d968e0e22c3bc0640c37929b0aa777f4f201e1fc1a5188231c4cf7a55ce92ede
MD5 c78c7ccdc2c75aa7429d72c448609c7e
BLAKE2b-256 7e9839fe9c2981bbdb9a9cfdd5d852f176eafe8edeb61a1972f9c6fbd644a190

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.7-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 107ab0adbb4b4a74577200cf161aad8729346f0ae74db698390d07218b744c24
MD5 abac36798f24d461dde8e4958858d749
BLAKE2b-256 4e40bd6db39acd8d7ca1c422b36d2ee28fbc49484b1eebc8823732c3ffa6bf96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 3817bb62509c69aa386f31b70ab4eb032745137a36c0a6866dbff82570e96094
MD5 a040ad70e99b96c2c8134bfc4a1583e6
BLAKE2b-256 9002fa4f02dd52845a1597cd30a495e121d5d07d404342af917758c9a976219c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.6-win32.egg
Algorithm Hash digest
SHA256 bbde3652f38da1a8e838c867c346daa8221732a2e1bf0cdb48cb9bdc4eb2f490
MD5 79af95945a5be01c19b67bc9d9c19389
BLAKE2b-256 3e99d729242836393b5438306eb1e40afc4e3712608568838c94939aabcad763

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.6-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 837446a5d2cfa7a0f06fd3cb54fcc7599f01c81f44dd8b121767f77642d875cd
MD5 08689f64dd65408fe661f637c320558c
BLAKE2b-256 014ee0c804ecc2799d574048536356ec13fb9befdc7c4dc81ec4e486886527d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.6-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 39d3640e823d025607f85245f89e6835541b5353a56c45beb75fc3ccdf7f9ffb
MD5 abc8de89ec579729480b47299b895df1
BLAKE2b-256 2ac2f3035890c7d072fac985f837e99d8f51522bdc0a173a12b4731580706e39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.6-macosx-10.6-universal.egg
Algorithm Hash digest
SHA256 b00a2d8c55f992cb1ed8e62226bb89ba9e8671d02a698963b6108e11d6c4272e
MD5 217d259a578441053d8f9c2444338e7a
BLAKE2b-256 b78c1a9574ef648da3ff7a18e90fc536b29427800e094b2f88a1c5a619e3232d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.5-win32.egg
Algorithm Hash digest
SHA256 7038930e9c78c62d9ed61772bed008e1962673e4a01d4c41409a9e954e79039e
MD5 3bb17ddfc5b12ce0b6f2a08a36aee34f
BLAKE2b-256 844c4b9e606343209e747c648b130f420df4b212ba1963c84b5e8b0a97371e91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.5-macosx-10.8-x86_64.egg
Algorithm Hash digest
SHA256 c0e62933bd376b3e13c5b086af7dcce93cde7897584b53513164b761468e8800
MD5 454f94eb7ef8009896713a66c726e378
BLAKE2b-256 f8320fe1802191e6f3bed79af7061da51a3b2c109defa809c813f07c2eae9bac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.5-macosx-10.7-x86_64.egg
Algorithm Hash digest
SHA256 8fefcadf788fc58b88580c04ec77d44a075892c03284b7bcb311f95d403e12dc
MD5 25eeedd1dedd20bf6da6b3ec868de449
BLAKE2b-256 fff4db7114c873739bedd6842e8b0c9c4a62e38739cd5ce5a9f1d7fbfee31552

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.5-macosx-10.6-i386.egg
Algorithm Hash digest
SHA256 5378ced91f639dd242b6afa27c6a20272d13fdbc76f7d1b323c1e9b17f7d4044
MD5 8020e6919f057edaac465179f491d51f
BLAKE2b-256 4c6841c9c4b1532856d00d5ea10f1cefecf4c7e737b08fb90dbbd05fb42879b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.4-py2.4-win32.egg
Algorithm Hash digest
SHA256 d5d2a749056e1fbbba8acc64bbff11e941ecd52720d0b5d526af686040af4176
MD5 b4528fd01b1ecc0536fbe18f8c50c19d
BLAKE2b-256 27066013dbf7712eb09bda4557d524fe201539573fafe056c14cda34d0356f08

See more details on using hashes here.

Supported by

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