def list_database_names(self, session=None):
        """Get a list of the names of all databases on the connected server.

        :Parameters:
          - `session` (optional): a
            :class:`~pymongo.client_session.ClientSession`.

        .. versionadded:: 3.6
        """
        return [doc["name"]
                for doc in self.list_databases(session, nameOnly=True)]
Get a list of the names of all databases on the connected server.

        :Parameters:
          - `session` (optional): a
            :class:`~pymongo.client_session.ClientSession`.

        .. versionadded:: 3.6
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/mongo_client.py