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

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

Uploaded Source

Built Distributions

pymongo-2.6.1.win-amd64-py3.3.exe (404.0 kB view details)

Uploaded Source

pymongo-2.6.1.win-amd64-py3.2.exe (406.2 kB view details)

Uploaded Source

pymongo-2.6.1.win-amd64-py2.7.exe (405.0 kB view details)

Uploaded Source

pymongo-2.6.1.win-amd64-py2.6.exe (405.5 kB view details)

Uploaded Source

pymongo-2.6.1.win32-py3.3.exe (372.2 kB view details)

Uploaded Source

pymongo-2.6.1.win32-py3.2.exe (377.4 kB view details)

Uploaded Source

pymongo-2.6.1.win32-py2.7.exe (376.8 kB view details)

Uploaded Source

pymongo-2.6.1.win32-py2.6.exe (376.8 kB view details)

Uploaded Source

pymongo-2.6.1.win32-py2.5.exe (242.3 kB view details)

Uploaded Source

pymongo-2.6.1.win32-py2.4.exe (242.3 kB view details)

Uploaded Source

pymongo-2.6.1-py3.3-win-amd64.egg (363.3 kB view details)

Uploaded Egg

pymongo-2.6.1-py3.3-win32.egg (362.5 kB view details)

Uploaded Egg

pymongo-2.6.1-py3.3-macosx-10.6-intel.egg (386.0 kB view details)

Uploaded Egg

pymongo-2.6.1-py3.2-win-amd64.egg (357.2 kB view details)

Uploaded Egg

pymongo-2.6.1-py3.2-win32.egg (356.3 kB view details)

Uploaded Egg

pymongo-2.6.1-py3.2-macosx-10.6-intel.egg (379.7 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.7-win-amd64.egg (351.5 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.7-win32.egg (350.8 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.7-macosx-10.8-intel.egg (370.7 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.7-macosx-10.7-intel.egg (371.1 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.6-win-amd64.egg (352.6 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.6-win32.egg (351.4 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.6-macosx-10.8-intel.egg (371.4 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.6-macosx-10.7-intel.egg (371.8 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.5-win32.egg (351.9 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.5-macosx-10.8-x86_64.egg (350.6 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.5-macosx-10.7-x86_64.egg (350.4 kB view details)

Uploaded Egg

pymongo-2.6.1-py2.4-win32.egg (355.3 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for pymongo-2.6.1.tar.gz
Algorithm Hash digest
SHA256 1ed87e7b297f4dfbf9a40176ffeb7faf1ac0b0952d290380f7e632a8fb93694c
MD5 ffcd2353e2696b3661fab3ba91a2fa71
BLAKE2b-256 cdffa8298e51751c18138c6a614ade2db820083b4d5c8ba5bda88d482d035cb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 71fabd4b15146975960c2edc08652ef49d06fb3ddf5da750c3f260fbcab71862
MD5 d77e979d65fd1c36b12be9c79ebfbfc2
BLAKE2b-256 f29ee79eef90bf5989db1d715c7659841aec797725d70e696a8b0e5e93390c7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 d65fb9e6f2ea729723c4db320e5979734612460fdbcccdd446b6c9d012236ef6
MD5 97b51d0abdc8c4d92ef7b1af88249efa
BLAKE2b-256 5cdd0b16be14fe527907741da8e1f1d1918b356f65160a8e19581e1cd351956f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 58513d8ed6c49ed7c43c308f6b6fb53bb12560feb33a38b66f232b25ec4683b7
MD5 7218fdc68d3091346c4fac7ecb8ae2e5
BLAKE2b-256 769a0cce577cd72e37c017b01657f5bb121d6caef49f044b35702eef233252eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 f9c9ea9d74d412e782465db94da0904e1275e470deeb609b4f75a621a4dc41d3
MD5 5ffd0ee69d76acca8679c8a13f9af8ca
BLAKE2b-256 ecda08504bf6428ce4b3a675da862e2ac7b8577b733eacf9939cd8182db81240

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win32-py3.3.exe
Algorithm Hash digest
SHA256 52f10b9722b4f0224ec908c2919dfeba209e3ab830a8d9a95eeb2e28e4f15a28
MD5 a8ec2c6a487749eca9f67c6f430250ed
BLAKE2b-256 092edb6bdbbb4a2b4872ab5228f6b3c706003e776789878cae754506044054ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win32-py3.2.exe
Algorithm Hash digest
SHA256 88368fce79b8d9891cb1ab483887e8fe2de1b4f0961aa411bf3c2367b36c0767
MD5 54a884fe3e1bb6a9053bee552be9a173
BLAKE2b-256 7756c11347cb67d4d2e80c6051bfa7c3d23dc5bae049f088173c79a1a494533a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win32-py2.7.exe
Algorithm Hash digest
SHA256 451b9ebe16f91fb407da569e4c5c4671551ff5d40ee804c952e709640ab667fb
MD5 20a7448e62448281d14a1583100c9d24
BLAKE2b-256 44f3c13e43409c177e9b2c2250cc88cb16f865c88f393da9bd65bd5c0a36627e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win32-py2.6.exe
Algorithm Hash digest
SHA256 8b91dce69977642cdd2be63d53ec459558ff7b2791f9ecd0204e2b96cbe6f512
MD5 226996624ce5fbe75f77ecec260c2e37
BLAKE2b-256 da82459f279dc6f7be82eebf9eee8d4058efee80c3ca726cd12a95c17d580845

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win32-py2.5.exe
Algorithm Hash digest
SHA256 caf6581533c4dcc8d5db405fe9b985e84b0400a2c58d3dec0400cb86a6661c81
MD5 81fa5608b619396dd5445ffc596d4122
BLAKE2b-256 8a7b8afde0904e217d55e001f99cf01d4fdf94ed4d835f274ca69e261ff5df85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1.win32-py2.4.exe
Algorithm Hash digest
SHA256 60147fcad610c73134b292904023113040acf3d21ade22de03e3b478ba739aac
MD5 901372a17d3eeece4608fc49eb19dcf7
BLAKE2b-256 3e9e67f0244c1b6c40906cd952a52b37c718c56a27176ffd2899f0a5c8d4457c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py3.3-win-amd64.egg
Algorithm Hash digest
SHA256 f0cb6bbf499004818bc0dc70588bbab73773d26f667633d20abe9e12fb629865
MD5 b6fac53132eb16c6feec5964d928023a
BLAKE2b-256 64499de1e2473b683b7f25309ab29bddefd2843f02a2c97a02f2049ca4fc6e28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py3.3-win32.egg
Algorithm Hash digest
SHA256 a96551137d6e65e7a36f041af5f1ab0af29a6b43afb55e965fb066e3463e3d16
MD5 18f5ae3476f8aaf28454adcee8789bf8
BLAKE2b-256 087dcf3dec133495aece84f2235a8d43ab7c267beda5699594d6fe556d65e3ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py3.3-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 a77786ba17a89f2e330b40b87fa03ae6a5aa931552a0b10f234ff07ce99c48f8
MD5 e4c15975c81f299e7d181faca407061d
BLAKE2b-256 220226b303ce925c3dd33978e8ab921af6764ad0240bec882e4cb829f6427e79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 bb1f03221cbeab9b31007b41abbb45eb24055485e44e2ad02500156c82b66858
MD5 55808614a7332eb5dd4710c9232c075c
BLAKE2b-256 281686cca4cd77f2da0f90e56b41c0c6f76c8cba633c3e523ac7ea0ffe4276d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py3.2-win32.egg
Algorithm Hash digest
SHA256 d926da65ff690da0160c7bb18939aece9dafb750620eb0293342fa9d54450a39
MD5 707d7af8e961d1ccc761695dc60b3f73
BLAKE2b-256 18a2f1a65c10f4d71eb463b79e6cd51fc998c0cd3653a36e3e23be1486325737

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py3.2-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 45cfaf1a2d80ea5188d9e82b65ea115f8172ff3603e966d3e90c153553eb7409
MD5 6a1518d36617b3e4ded648af32e59843
BLAKE2b-256 96ff9e5c281b522d9e67accc9ef0b173f8a2d13aebf7d9db189c7464cd969c13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 cd7951fa91fa41829cfa2c2ca2311a2f9d286d805a79b2e89f089403173fe883
MD5 d91e95a9d84dd1de556166685e49fff1
BLAKE2b-256 8fa70ccdcb9dfb323559bbc79622bc5769f6994a08a324de9d1d1d36b038b731

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.7-win32.egg
Algorithm Hash digest
SHA256 46074b5852c23a756a74253f00e53ddc16db98ddf40d00cc4e3547fdb9a50852
MD5 b0bdecf1a100ad1a23a444061e520630
BLAKE2b-256 942f49298589460f8ba2d3740e1eabb39e1c8e61631877610652fa90d22f7b8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.7-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 58a0fa60379f78f9b04efdab658885c97bd9716358fa394a9c4450ba42aaa6ff
MD5 20312f069dcfc7348168d2857aa118c0
BLAKE2b-256 aca7f53d872a17789007df81d0b3e0939cd35ba7b634ab8b849df4226bbf0b61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.7-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 e0b2a7dc99fd1bb82b31b37fa7affa731bad9d2c633dc984b2ef74f24310a652
MD5 e45450a5137cdd05fa1d88ac75751118
BLAKE2b-256 6f51bca882f555e99c8ba99f15d0a6ca3751a5007fc9a1dfca09f868ff916864

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 68edcc124e9c8f0600fdfd4dda0ee97113f73dc8f1cf02846f9b4ea8fbfd2353
MD5 69400197b1b6d092b320fa497bdb1e2f
BLAKE2b-256 328b053402f19d7b8d4638a2bf1da78ca8c7516ae7b15f7fe9e7b40d544d314a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.6-win32.egg
Algorithm Hash digest
SHA256 a418be47843d4dfc79536c99ecbfb417b3173068b84b0cf362f2d0ad666258ca
MD5 0cdfae42b4f32bf63649b780041083ee
BLAKE2b-256 967cb4ebfc53dfd40c2c0d32c1e3b857b7bba2c99bd02cfa6b3bc285cb611dbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.6-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 6720ccca40e64628096b41717c56f38cf630f1c62c669ad505adfe1c708195d2
MD5 049f68d6188067ac33cb9e152c538c0a
BLAKE2b-256 d589c23e0e390b3e78fd4ec150a10c45a4f2f7c8c5018d281a65714f241bef21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.6-macosx-10.7-intel.egg
Algorithm Hash digest
SHA256 56bde87b6d63f8d06abe2378f30cb646fdbe27f0bb1d22e6fcf6ac31e2c86333
MD5 57bd72d399c2b5a764026f7492d17f57
BLAKE2b-256 c0efe1e03c30b1cbfe55576a03d8783044caa980f9864fb3c818feb0d802773f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.5-win32.egg
Algorithm Hash digest
SHA256 74158f517932730b33948fda1fe09ab47e3bd7a7fb8bfe45bd399d11a1964a57
MD5 738cf54fc7d579169e2c56bd960de765
BLAKE2b-256 c74717e7095a9187a606e6e18ae91e3b1b97910f8151a160cf4301a4052b97de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.5-macosx-10.8-x86_64.egg
Algorithm Hash digest
SHA256 adf7c5487593b81de1979182f1d9020fad6ea34c3edee52b23de6d03b37adbe7
MD5 d7e226fd16f85c517adea0d72c7fbfcf
BLAKE2b-256 52380b6d25253bc459c367e70b4be1180db5017a70ed5987e619c28210cd263f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.5-macosx-10.7-x86_64.egg
Algorithm Hash digest
SHA256 b7a0fb9b03fdb807a46b57bc51c2d1c5f2f92d405c54e45bbb95cecdb0581e3e
MD5 b150383ce5e9fbdab722c1b4ba05a0b8
BLAKE2b-256 02de71069e85beaa300141dcbd40028163092b7e4f380f6aa524d0c13953ebc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymongo-2.6.1-py2.4-win32.egg
Algorithm Hash digest
SHA256 3025505e740b342cf14d141f6442c9bb0c0a4e3249cad889631b822423cd5135
MD5 2b2838ad1f7328088288c94430ccf461
BLAKE2b-256 28954cdab5db824f5bd0c972061b8b02429d54fa843f68676fe4114aa80a2fa7

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