docs for pymongo->bson move PYTHON-60

This commit is contained in:
Mike Dirolf 2010-09-14 16:34:46 -04:00
parent eea654ce33
commit 381cd8cb80
27 changed files with 231 additions and 103 deletions

View File

@ -8,8 +8,10 @@ About
=====
The PyMongo distribution contains tools for interacting with MongoDB
database from Python. The ``pymongo`` package is a native Python
driver for MongoDB. The ``gridfs`` package is a `gridfs
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``.

View File

@ -41,5 +41,5 @@ class FixedOffset(tzinfo):
return ZERO
"""UTC"""
utc = FixedOffset(0, "UTC")
"""Fixed offset timezone representing UTC."""

16
doc/api/bson/binary.rst Normal file
View File

@ -0,0 +1,16 @@
:mod:`binary` -- Tools for representing binary data to be stored in MongoDB
===========================================================================
.. automodule:: bson.binary
:synopsis: Tools for representing binary data to be stored in MongoDB
.. autodata:: BINARY_SUBTYPE
.. autodata:: FUNCTION_SUBTYPE
.. autodata:: OLD_BINARY_SUBTYPE
.. autodata:: UUID_SUBTYPE
.. autodata:: MD5_SUBTYPE
.. autodata:: USER_DEFINED_SUBTYPE
.. autoclass:: Binary(data[, subtype=BINARY_SUBTYPE])
:members:
:show-inheritance:

9
doc/api/bson/code.rst Normal file
View File

@ -0,0 +1,9 @@
:mod:`code` -- Tools for representing JavaScript code
=====================================================
.. automodule:: bson.code
:synopsis: Tools for representing JavaScript code
.. autoclass:: Code(code[, scope=None[, **kwargs]])
:members:
:show-inheritance:

6
doc/api/bson/dbref.rst Normal file
View File

@ -0,0 +1,6 @@
:mod:`dbref` -- Tools for manipulating DBRefs (references to documents stored in MongoDB)
=========================================================================================
.. automodule:: bson.dbref
:synopsis: Tools for manipulating DBRefs (references to documents stored in MongoDB)
:members:

6
doc/api/bson/errors.rst Normal file
View File

@ -0,0 +1,6 @@
:mod:`errors` -- Exceptions raised by the :mod:`bson` package
================================================================
.. automodule:: bson.errors
:synopsis: Exceptions raised by the bson package
:members:

23
doc/api/bson/index.rst Normal file
View File

@ -0,0 +1,23 @@
:mod:`bson` -- BSON (Binary JSON) Encoding and Decoding
=======================================================
.. automodule:: bson
:synopsis: BSON (Binary JSON) Encoding and Decoding
:members:
Sub-modules:
.. toctree::
:maxdepth: 2
binary
code
dbref
errors
json_util
max_key
min_key
objectid
son
timestamp
tz_util

View File

@ -0,0 +1,8 @@
:mod:`json_util` -- Tools for using Python's :mod:`json` module with BSON documents
======================================================================================
.. versionadded:: 1.1.1
.. automodule:: bson.json_util
:synopsis: Tools for using Python's json module with BSON documents
:members:
:undoc-members:

7
doc/api/bson/max_key.rst Normal file
View File

@ -0,0 +1,7 @@
:mod:`max_key` -- Representation for the MongoDB internal MaxKey type
=====================================================================
.. versionadded:: 1.7
.. automodule:: bson.max_key
:synopsis: Representation for the MongoDB internal MaxKey type
:members:

7
doc/api/bson/min_key.rst Normal file
View File

@ -0,0 +1,7 @@
:mod:`min_key` -- Representation for the MongoDB internal MinKey type
=====================================================================
.. versionadded:: 1.7
.. automodule:: bson.min_key
:synopsis: Representation for the MongoDB internal MinKey type
:members:

27
doc/api/bson/objectid.rst Normal file
View File

@ -0,0 +1,27 @@
:mod:`objectid` -- Tools for working with MongoDB ObjectIds
===========================================================
.. automodule:: bson.objectid
:synopsis: Tools for working with MongoDB ObjectIds
.. autoclass:: pymongo.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.

6
doc/api/bson/son.rst Normal file
View File

@ -0,0 +1,6 @@
:mod:`son` -- Tools for working with SON, an ordered mapping
============================================================
.. automodule:: bson.son
:synopsis: Tools for working with SON, an ordered mapping
:members:

View File

@ -0,0 +1,7 @@
:mod:`timestamp` -- Tools for representing MongoDB internal Timestamps
======================================================================
.. versionadded:: 1.5
.. automodule:: bson.timestamp
:synopsis: Tools for representing MongoDB internal Timestamps
:members:

6
doc/api/bson/tz_util.rst Normal file
View File

@ -0,0 +1,6 @@
:mod:`tz_util` -- Utilities for dealing with timezones in Python
================================================================
.. automodule:: bson.tz_util
:synopsis: Utilities for dealing with timezones in Python
:members:

View File

@ -1,14 +1,17 @@
API Documentation
=================
The PyMongo distribution contains two root packages for interacting with
MongoDB. :mod:`pymongo` is a full-featured driver for MongoDB and
:mod:`gridfs` is a set of tools for working with the `GridFS
The PyMongo distribution contains three top-level packages for
interacting with MongoDB. :mod:`bson` is an implementation of the
`BSON format <http://bsonspec.org>`_, :mod:`pymongo` is a
full-featured driver for MongoDB, and :mod:`gridfs` is a set of tools
for working with the `GridFS
<http://www.mongodb.org/display/DOCS/GridFS+Specification>`_ storage
specification.
.. toctree::
:maxdepth: 2
bson/index
pymongo/index
gridfs/index

View File

@ -1,16 +1,8 @@
:mod:`binary` -- Tools for representing binary data to be stored in MongoDB
===========================================================================
:mod:`binary` -- MOVED
======================
.. automodule:: pymongo.binary
:synopsis: Tools for representing binary data to be stored in MongoDB
This module has been deprecated in favor of :mod:`bson.binary`. Please
use that module instead.
.. autodata:: BINARY_SUBTYPE
.. autodata:: FUNCTION_SUBTYPE
.. autodata:: OLD_BINARY_SUBTYPE
.. autodata:: UUID_SUBTYPE
.. autodata:: MD5_SUBTYPE
.. autodata:: USER_DEFINED_SUBTYPE
.. autoclass:: Binary(data[, subtype=BINARY_SUBTYPE])
:members:
:show-inheritance:
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,7 +1,8 @@
:mod:`bson` -- Tools for working with `BSON <http://www.mongodb.org/display/DOCS/BSON>`_ in Python
==================================================================================================
:mod:`bson` -- MOVED
====================
.. automodule:: pymongo.bson
:synopsis: Tools for working with BSON in Python
:members:
:show-inheritance:
This module has been deprecated in favor of :mod:`bson`. Please use
that module instead.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,9 +1,8 @@
:mod:`code` -- Tools for representing JavaScript code to be evaluated by MongoDB
================================================================================
:mod:`code` -- MOVED
====================
.. automodule:: pymongo.code
:synopsis: Tools for representing JavaScript code to be evaluated by MongoDB
This module has been deprecated in favor of :mod:`bson.code`. Please
use that module instead.
.. autoclass:: Code(code[, scope=None[, **kwargs]])
:members:
:show-inheritance:
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,6 +1,8 @@
:mod:`dbref` -- Tools for manipulating DBRefs (references to documents stored in MongoDB)
=========================================================================================
:mod:`dbref` -- MOVED
=====================
.. automodule:: pymongo.dbref
:synopsis: Tools for manipulating DBRefs (references to documents stored in MongoDB)
:members:
This module has been deprecated in favor of :mod:`bson.dbref`. Please
use that module instead.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -22,16 +22,23 @@ Sub-modules:
cursor
errors
master_slave_connection
message
son_manipulator
cursor_manager
Deprecated sub-modules (moved to the :mod:`bson` package):
.. toctree::
:maxdepth: 2
bson
binary
code
dbref
binary
objectid
bson
message
son
son_manipulator
timestamp
min_key
max_key
json_util
cursor_manager
max_key
min_key
objectid
son
timestamp
tz_util

View File

@ -1,8 +1,8 @@
:mod:`json_util` -- Tools for using Python's :mod:`json` module with MongoDB documents
======================================================================================
.. versionadded:: 1.1.1
:mod:`json_util` -- MOVED
=========================
.. automodule:: pymongo.json_util
:synopsis: Tools for using Python's json module with MongoDB documents
:members:
:undoc-members:
This module has been deprecated in favor of
:mod:`bson.json_util`. Please use that module instead.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,7 +1,8 @@
:mod:`max_key` -- Representation for the MongoDB internal MaxKey type
=====================================================================
.. versionadded:: 1.7
:mod:`max_key` -- MOVED
=======================
.. automodule:: pymongo.max_key
:synopsis: Representation for the MongoDB internal MaxKey type
:members:
This module has been deprecated in favor of
:mod:`bson.max_key`. Please use that module instead.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,7 +1,8 @@
:mod:`min_key` -- Representation for the MongoDB internal MinKey type
=====================================================================
.. versionadded:: 1.7
:mod:`min_key` -- MOVED
=======================
.. automodule:: pymongo.min_key
:synopsis: Representation for the MongoDB internal MinKey type
:members:
This module has been deprecated in favor of
:mod:`bson.min_key`. Please use that module instead.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,27 +1,8 @@
:mod:`objectid` -- Tools for working with MongoDB ObjectIds
===========================================================
:mod:`objectid` -- MOVED
========================
.. automodule:: pymongo.objectid
:synopsis: Tools for working with MongoDB ObjectIds
This module has been deprecated in favor of
:mod:`bson.objectid`. Please use that module instead.
.. autoclass:: pymongo.objectid.ObjectId([oid=None])
:members:
.. describe:: str(o)
Get a hex encoded version of :class:`ObjectId` `o`.
The following property always holds:
.. testsetup::
from pymongo.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.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,6 +1,8 @@
:mod:`son` -- Tools for working with SON, an ordered mapping
============================================================
:mod:`son` -- MOVED
===================
.. automodule:: pymongo.son
:synopsis: Tools for working with SON, an ordered mapping
:members:
This module has been deprecated in favor of :mod:`bson.son`. Please
use that module instead.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -1,7 +1,8 @@
:mod:`timestamp` -- Tools for representing MongoDB internal Timestamps
======================================================================
.. versionadded:: 1.5
:mod:`timestamp` -- MOVED
=========================
.. automodule:: pymongo.timestamp
:synopsis: Tools for representing MongoDB internal Timestamps
:members:
This module has been deprecated in favor of
:mod:`bson.timestamp`. Please use that module instead.
.. versionchanged:: 1.8.1+
Deprecated.

View File

@ -0,0 +1,8 @@
:mod:`tz_util` -- MOVED
=======================
This module has been deprecated in favor of
:mod:`bson.tz_util`. Please use that module instead.
.. versionchanged:: 1.8.1+
Deprecated.