Metadata-Version: 1.1
Name: mongo-inspector
Version: 0.2
Summary: Schema extractor for MongoDB.
Home-page: http://github.com/martinmaillard/mongo-inspector
Author: Martin Maillard
Author-email: self@martin-maillard.com
License: Copyright 2013 Martin Maillard

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
Description: 
        # Schema extractor for MongoDB
        
        Mongo-inspector is a Python library that analyses the data of a MongoDB
        database to extract its "schema" (I know...).
        
        ## Installation
        
            $ pip install mongo-inspector
        
        ## Usage
        
            import mongo_inspector
            schema = mongo_inspector.extract_schema(
                db_name='mydb',
                host='myhost',  # optional: default 'localhost'
                port=xxxx       # optional: default 27017
            )
        
        The returned schema looks like that:
        
            {
                u'SomeCollection': [
                    Attribute(name=u'id', types=[u'String']),
                    Attribute(name=u'someattribute', types=[u'String'])
                ],
                u'AnotherCollection': [
                    Attribute(name=u'_id', types=[u'ObjectId']),
                    Attribute(name=u'someattr', types=[u'Object']),
                    Attribute(name=u'someattr.nested', types=[u'Number']),
                    Attribute(name=u'somelist', types=[u'Array']),
                    Attribute(name=u'somelist.__item__', types=[u'Object']),
                    Attribute(name=u'somelist.__item__.nested',
                              types=[u'String', u'Number'])
                ]
            }
        
        `Attribute(name, types)` is just a `nametuple`. Each attribute can have
        several types.
        
        ## Future
        
        * It might be usefull to return a tree instead of 'point-separated'
          nested keys.
        
Keywords: mongodb
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Topic :: Database
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: Apache Software License
