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

This version

2.5

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

Uploaded Source

Built Distributions

pymongo-2.5.win-amd64-py3.3.exe (391.1 kB view details)

Uploaded Source

pymongo-2.5.win-amd64-py3.2.exe (393.3 kB view details)

Uploaded Source

pymongo-2.5.win-amd64-py2.7.exe (392.0 kB view details)

Uploaded Source

pymongo-2.5.win-amd64-py2.6.exe (392.5 kB view details)

Uploaded Source

pymongo-2.5.win32-py3.3.exe (358.4 kB view details)

Uploaded Source

pymongo-2.5.win32-py3.2.exe (363.5 kB view details)

Uploaded Source

pymongo-2.5.win32-py2.7.exe (363.3 kB view details)

Uploaded Source

pymongo-2.5.win32-py2.6.exe (363.8 kB view details)

Uploaded Source

pymongo-2.5.win32-py2.5.exe (229.6 kB view details)

Uploaded Source

pymongo-2.5.win32-py2.4.exe (229.6 kB view details)

Uploaded Source

pymongo-2.5-py3.3-win-amd64.egg (338.6 kB view details)

Uploaded Source

pymongo-2.5-py3.3-win32.egg (337.0 kB view details)

Uploaded Source

pymongo-2.5-py3.3-macosx-10.6-intel.egg (360.6 kB view details)

Uploaded Source

pymongo-2.5-py3.3-macosx-10.5-fat.egg (359.7 kB view details)

Uploaded Source

pymongo-2.5-py3.2-win-amd64.egg (333.0 kB view details)

Uploaded Source

pymongo-2.5-py3.2-win32.egg (331.1 kB view details)

Uploaded Source

pymongo-2.5-py3.2-macosx-10.6-intel.egg (354.8 kB view details)

Uploaded Source

pymongo-2.5-py3.2-macosx-10.3-fat.egg (353.5 kB view details)

Uploaded Source

pymongo-2.5-py2.7-win-amd64.egg (327.5 kB view details)

Uploaded Source

pymongo-2.5-py2.7-win32.egg (326.2 kB view details)

Uploaded Source

pymongo-2.5-py2.7-macosx-10.8-intel.egg (344.1 kB view details)

Uploaded Source

pymongo-2.5-py2.7-macosx-10.7-intel.egg (344.4 kB view details)

Uploaded Source

pymongo-2.5-py2.7-macosx-10.6-intel.egg (347.7 kB view details)

Uploaded Source

pymongo-2.5-py2.6-win-amd64.egg (328.7 kB view details)

Uploaded Source

pymongo-2.5-py2.6-win32.egg (327.4 kB view details)

Uploaded Source

pymongo-2.5-py2.6-macosx-10.8-intel.egg (344.7 kB view details)

Uploaded Source

pymongo-2.5-py2.6-macosx-10.7-intel.egg (345.0 kB view details)

Uploaded Source

pymongo-2.5-py2.6-macosx-10.6-universal.egg (364.8 kB view details)

Uploaded Source

pymongo-2.5-py2.5-win32.egg (328.1 kB view details)

Uploaded Source

pymongo-2.5-py2.5-macosx-10.8-x86_64.egg (326.3 kB view details)

Uploaded Source

pymongo-2.5-py2.5-macosx-10.7-x86_64.egg (326.3 kB view details)

Uploaded Source

pymongo-2.5-py2.5-macosx-10.6-i386.egg (345.9 kB view details)

Uploaded Source

pymongo-2.5-py2.4-win32.egg (331.2 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pymongo-2.5.tar.gz
Algorithm Hash digest
SHA256 79aff1c77ec6be6158a4d1a11002400ee0eb8f74dc6f4f67527f59bfac78c222
MD5 8dd2f563c25f92d07a15a3d37e0adbe8
BLAKE2b-256 751717445ccc77eea0abc5b3e3c5936e1d980ce823efbde4598e3b8b3a73a0fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 9cdcecd0b7c910a81afffeb2a1fa39c89d32c73c0dfa9a3a596fcd47e0237a9e
MD5 b824d5ec09621c1e9310a416f551acde
BLAKE2b-256 54d4bff4e9e222f0ada094b54be45371275b33333f6375b6f2c9ec5bb1286ae9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 ce8772de8f2253f420a281f0487f62bea2eae16e6f2370b97c309c81bc6008c3
MD5 93cdabb7234a1e9281e76fc0a8b1b9d6
BLAKE2b-256 25bff8e5ef46cdf8d7991ad891981b4772deaf5ee937a9659d001035d31b89d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 4ed50d3cae8b939cab324a6ae56e81ef3ca22787c5697e46ad5f65d1c97247a3
MD5 8f5079f888280a34e1395e9a53d495dd
BLAKE2b-256 409c6d14ef2b7135fe2145b3b196cae59f8d1b135006132d3d818749299a6ec3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 f526ede7736e6419fbfd80331efcbe8851590c083b3f692a65b605c92689dabb
MD5 ab766d4b858540f0e563aae0751a20f9
BLAKE2b-256 b0ca64be42392271b60c09fe50011c98c0750e4ba14322909f2dfb154452898f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win32-py3.3.exe
Algorithm Hash digest
SHA256 7b92eb1519ff4122dd7b4f12448c92fc401cfd6516ddb388775fdbb2f9c2de00
MD5 243f64685adafc4c286866768588eddf
BLAKE2b-256 bc1fb18d52fab896071e69ca4c047fd26c6ff737d3bdb4f81261b9b72bc14dad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win32-py3.2.exe
Algorithm Hash digest
SHA256 6e5b3f87923f78c82d284574b58abd35a0a158b57ccf42ca7c8f657f82737153
MD5 664ba780d606a346c09c99b645671e3f
BLAKE2b-256 4486793946e4b27eaf357944ce18187fbaac6e5719cdce7800fa69ff4ebcb2ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win32-py2.7.exe
Algorithm Hash digest
SHA256 b6ab381a4ff319dbc0f3f4bf460a94d34262816c8181706a726e5a638506e1c7
MD5 620e89efba6be15dbcc176395e6680ca
BLAKE2b-256 451059a4ab741919febc464bfc1418693a2b9e9c3daacc329799953aee0f803c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win32-py2.6.exe
Algorithm Hash digest
SHA256 dab6e50e469e12ca17c9d74458ae502c7053c72c6fd1ea514cfbab1adb35f00a
MD5 586016c9ea0811b9ebe060d4e7032e22
BLAKE2b-256 33b6e78188729388e20aab500fa1874cb4ec9d1bdfb32a11b9d0e56d756a159e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win32-py2.5.exe
Algorithm Hash digest
SHA256 ac1a77080ab79406b7b46cea4424a624d8500968b785f70107db73bae2d9f379
MD5 75a998dc9dd2874663ed85a89b0ed1e9
BLAKE2b-256 405edafa0d2d3f9d1303e4dda2384a65a517cbab2456c0cae4f1ec2e33847ca4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5.win32-py2.4.exe
Algorithm Hash digest
SHA256 7c5427d3e4281d83ac49ff7cc4ad074b36bcc4b8b58ab887a100606547299903
MD5 c7de559c4a1645efdb05dc8ee6518ace
BLAKE2b-256 06cae19a98dad624fbd25b5655717b348230e21e00729f32e206cca7e5b2d913

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.3-win-amd64.egg
Algorithm Hash digest
SHA256 605e6b08ed10e41856177dc2f04be35feda41660bcfcdf4a71da750462e24e59
MD5 516023b5624b47bc20eacd9754c4eee5
BLAKE2b-256 848ccd8407618ede19fc3ec72ecfdb6a13bd51209a5a2431f5fb41a3c27bfb7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.3-win32.egg
Algorithm Hash digest
SHA256 de4446497b69a91a8a2f66b08c4a648fbf548a6d700c41abd70bf2ac37abc838
MD5 a209b166296ebbe8b15910f6565545b6
BLAKE2b-256 57975e929f3319043b1bbdb4ef6034f1c3c60bd61b1942276e8bc913cab32db1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.3-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 c13cd24555dc53f9dffd046627071cf433dab920c1c21905c94ebc3cd39b1ab0
MD5 c31d0f241083c814fae0d1e2e1ce69be
BLAKE2b-256 00c123f3235b0c91c049c01b7e508295248f35cb056f25969493c1887cb56d7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.3-macosx-10.5-fat.egg
Algorithm Hash digest
SHA256 a5e6451d4b62799e08128456cbe1e39c3f3139e2a996dc08085b27f907c7900c
MD5 f287e306149d0e2296975ea97ac675e5
BLAKE2b-256 5d1f643eba868d2541ec5f731e205b2280757f7028193db567489382b4166f6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 5991988981bd96266d53c832eb6f3a65fc3f8a651a363b9e94b9fc3f40e0f4fa
MD5 0fee36914063983bccc3f1aadc68fad8
BLAKE2b-256 80c74f98720dc361060530131d5c2cc873d05016f8d9db8889d954893a7ba0ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.2-win32.egg
Algorithm Hash digest
SHA256 0c8ab6d3d70716d8786ad8c40f3d2bddbd0b599f5bbfb3e2718e7a9d2a702702
MD5 fe3f1f1cc8b318cd37136a28cefa096b
BLAKE2b-256 7d7cf9a0e0d7746d4199626db198d729c7c65e796cd85a516cd984708bf022fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.2-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 6bcfc779852bf8dca53035f708e7e159015803dd4714a6a7e8afda4ea2447bd1
MD5 b3c960e1d8813fe18f217dffd189d2df
BLAKE2b-256 4f4448c085245c0d2367e7407377675512018622c973196801848c8b3b322a50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py3.2-macosx-10.3-fat.egg
Algorithm Hash digest
SHA256 b56cc5ef0212968f008b30da7652fa8ebeb5cc0e22795b5759dcbf38fcbb1a35
MD5 59b5249914cd070785f9f16dcb0d0cab
BLAKE2b-256 c18da8c1753978e03abb9bb159e01f38c0d58a90d97f8f38a8a6e805816af53d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 7bf88881118121a73fae59b6b7f39b2ff34438a5c72a033b2a55f256845f07ec
MD5 b274eb57000c54da6520eee41a633734
BLAKE2b-256 31542d5ea61d60248bd6108a30a3b05d6d027fbc53366864313266e8afdac37a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.7-win32.egg
Algorithm Hash digest
SHA256 70ff49d67f9a52f552cfc0368d61fc8d041327a45aa8ece876065aa89933ded6
MD5 439a91e898fcb3eb3c7b18da41918123
BLAKE2b-256 73030f88968c92247da622982d4baf78654c6dbfe0a69007044cede1690de3c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.7-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 45c2f74ac8f11c9066f45222b33fa95263f2c8b71c3d57795fa374136a69c067
MD5 814b418b950f7b707091dd10b60fa91e
BLAKE2b-256 ea847190e573f9a8a4c744946db3f3bd8bbdd53092570fb73847702a31db35e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.7-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 5544fceff99cd0b8642c6258de60bbcf14954e9b7c6104e473b84fdf681b2792
MD5 69f055a9c42ed0b0ce6169f6fd008d4d
BLAKE2b-256 191ad7ddf1560206e1e4cf6d00e4baf389dcac126d307f907859a605ed03d820

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.7-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 c7c669b94d559b1d107061d95fd6b307bcfe1f9f0a3b22e2034a9c26af76aa76
MD5 d5b8374b31d6752b91f7ed4c75d5f364
BLAKE2b-256 8b217410e8ad4a275098092d17fc8e7cdbf49c136cae56167cdd41e22b9632d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 e0b79785bfaa2d7b95567e5fe67ab844ccdb7aa2791a8c66dd44fe8fe9abbf93
MD5 e7a9e6a7a91dd9977e4196e26d492c02
BLAKE2b-256 62f0173d4c75f20632c50aad1405e69e61293df753d173df753ee454fc4f5200

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.6-win32.egg
Algorithm Hash digest
SHA256 ca0075ad65ba1432e9545cadd6d38a7f499073d066552618f0496d2c02f43e7f
MD5 16ed015b9a37e2c5f39433a6e2783a06
BLAKE2b-256 870d446b2cd128dc9993c625af3871fdfa19a180e514e8a57f11fec64ea20776

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.6-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 ffad4bc8c64b962a99a7ecb0124f812f50ce48cccd4109f3c8e2bf7395779502
MD5 6d2bcb9a4ed553f5b6db2e6fa4d077d7
BLAKE2b-256 5834cc458cfd554a896dac4b272d8ed4d49f2a848edfbab9aa489fea6a7815d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.6-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 8cb315bb57a1dde56ea2c99dd6dda999b1fe54a5d7e47c56a60e215b41d1ad20
MD5 56699f853b180746744bb9127156c2b5
BLAKE2b-256 bad7a44027b21ada7f664e734479ee4527c17597639f7ade39b8fc776238409b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.6-macosx-10.6-universal.egg
Algorithm Hash digest
SHA256 17308a5a595e7c2aea1e893814d9e00529626488b6f031dfc0e9079c3347d982
MD5 e816c1fd172d0aedde60f1434a8541c6
BLAKE2b-256 6baf4a71937df98afdc6d4779b2a73baaa0d5d091eeb929ff1204bd4d50e4366

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.5-win32.egg
Algorithm Hash digest
SHA256 8cb942be07f5aa47a9335b38137e0b2c5bb9237b07ff389c5fe8a3d54076df14
MD5 05211a403ba89bddd0bd70d4f7557920
BLAKE2b-256 9dc3b5ff63ab60b806a5671849c237c73c987deecd604e8a0775eeedde4d3498

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.5-macosx-10.8-x86_64.egg
Algorithm Hash digest
SHA256 b68eaad32973d35524b73fad5c88b84d7be807c345827fd108499879538f60d8
MD5 8e786cb319a5b1bab57dfd632ddbc085
BLAKE2b-256 9cafda58a5c11bd94328d956514c2ea047e740243d79a29f1ff624dd106d22b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.5-macosx-10.7-x86_64.egg
Algorithm Hash digest
SHA256 0ea725c44158b82af499729c3304fff14eb3132660b3e4a1a47c20f4e442475a
MD5 a9d6a37a0effb20c1f0a40e3774505ab
BLAKE2b-256 7735769ca71aabe7c626a5023976caac8c353c17f948ca21a51512094f051cae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.5-macosx-10.6-i386.egg
Algorithm Hash digest
SHA256 ba02b3b4b11323d4a325dbfb134a3bfc5418529d72220a6373536ecf0ea8bde7
MD5 476ff5fcd2df56763be9efc44c9d469b
BLAKE2b-256 4d1b6d30d3cf7f5f418e1c5d9c3ebf51f035cc5a8ce582b372a9cccb0715afd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.5-py2.4-win32.egg
Algorithm Hash digest
SHA256 42474774d2d17f0972e1bb3a5557e07532e7d9e439756807ab1dec09959f1893
MD5 31e01049ed74c05fd3215e9bea418c6c
BLAKE2b-256 29ff48ef71999301aa2ec55fd963a19425e7f125e38f578f6c5e579ccbae5901

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