Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install mongodoc

How to install mongodoc

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install mongodoc
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3 Available View build log
0.2b Failed View build log
0.2a Failed View build log
0.1 Available View build log
Windows (64-bit)
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3 Available View build log
0.2b Failed View build log
0.2a Failed View build log
0.1 Available View build log
Mac OS X (10.5+)
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3 Available View build log
0.2b Failed View build log
0.2a Failed View build log
0.1 Available View build log
Linux (32-bit)
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3 Available View build log
0.2b Failed View build log
0.2a Failed View build log
0.1 Available View build log
Linux (64-bit)
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3 Available View build log
0.2b Failed View build log
0.2a Failed View build log
0.1 Available View build log
 
Author
License
MIT License
Dependencies
Imports
Lastest release
version 0.3.3 on Jan 6th, 2012

If you have a mongodb database that you wish to document, a good starting point might be to install mongodoc and use the mongodoc command:

% mongodoc test

After answering a few questions, you will get an output file that will look something like this:

       _____________________________________________
      | hobbies                                     |
      |_____________________________________________|
   +--| _id: <class 'bson.objectid.ObjectId'>       |
   |  | title:               <type 'unicode'>       |
   |  |_____________________________________________|
   |
   |   _____________________________________________
   |  | occupations                                 |
   |  |_____________________________________________|
+--+--| _id: <class 'bson.objectid.ObjectId'>       |
|  |  | duties:                 <type 'list'>       |
|  |  | title:               <type 'unicode'>       |
|  |  |_____________________________________________|
|  |
|  |   ____________________________________________________________________________________
|  |  | people                                                                             |
|  |  |____________________________________________________________________________________|
|  |  | _id:        <class 'bson.objectid.ObjectId'>       ________________________________|
|  |  | address:                       <type 'dict'>     | address                        ||
|  |  | first:                      <type 'unicode'>     |________________________________||
|  +--| hobby:      <class 'bson.objectid.ObjectId'>     | number: <type 'unicode'>       ||
|     | last:                       <type 'unicode'>     | state:  <type 'unicode'>       ||
+-----| occupation: <class 'bson.objectid.ObjectId'>     | street: <type 'unicode'>       ||
      |                                                  | zip:    <type 'unicode'>       ||
      |                                                  |________________________________||
      |____________________________________________________________________________________|

The document in the people collection has a sub-document for the value of the address field, so it appears as a box within the people diagram. You will get one of these diagrams for each collection in the db. MongoDoc found that there is a probable link between the _id of occupations and the occupation field of the people doc. If the find links feature is not working for you, you can disable it with the --find-links option

The mongodoc command has a few options for connecting to the db:

% mongodoc -h
usage: mongodoc [-h] [--port PORT] [--host HOST] [--username USERNAME]
              [--password PASSWORD] [--file FILE]
              name

Document a mongo db

positional arguments:
  name                 The name of the mongo db to document

optional arguments:
  -h, --help           show this help message and exit
  --port PORT          The db port number
  --host HOST          The db host
  --username USERNAME  The username for authenticating to the db
  --password PASSWORD  The password for authenticating to the db
  --file FILE          The name of the output file
  --find-links         Enter no if you don't want to find links.

Changelog

0.3.3
  • Bugfix: didn't show sub documents when the subdocs were longer than the parent doc.

System Message: WARNING/2 (<string>, line 77)

Bullet list ends without a blank line; unexpected unindent.
0.3.2
  • Bugfix: bombed when the value of a field was {}
0.3.1
  • Forgot to update the changelog on 0.3
  • Minor edit in README.rst.
0.3
  • Changed the console command from doc-db to mongodoc
  • Fixed easy_install problem because of a missing HISTORY file - OOPS!
0.2b
  • Fixed a bug in counting similar docs
  • When the user keeps saying no to the 'use this doc' prompt
0.2a
  • Added a simple method to help find the most representative doc in each collection
  • Added a class that finds links between collections and draws lines between them
0.1
  • Initial release

Subscribe to package updates

Last updated Jan 6th, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.