def __getattr__(self, name):
        if name.startswith('_'):
            raise AttributeError(
                "Database has no attribute %r. To access the %s"
                " collection, use database[%r]." % (name, name, name))
        return self.__getitem__(name)
Get a collection of this database by name.
dataset/ETHPy150Open mongodb/mongo-python-driver/pymongo/database.py/Database.__getattr__