Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 80254de7309a83db0d77fa71bf608e46 > files > 58

python-bson-2.5.2-2.fc18.i686.rpm

:mod:`objectid` -- Tools for working with MongoDB ObjectIds
===========================================================

.. automodule:: bson.objectid
   :synopsis: Tools for working with MongoDB ObjectIds

   .. autoclass:: bson.objectid.ObjectId([oid=None])
      :members:

      .. describe:: str(o)

         Get a hex encoded version of :class:`ObjectId` `o`.

         The following property always holds:

         .. testsetup::

           from bson.objectid import ObjectId

         .. doctest::

           >>> o = ObjectId()
           >>> o == ObjectId(str(o))
           True

         This representation is useful for urls or other places where
         ``o.binary`` is inappropriate.