返回连接的客户端

def create_client(self,only_db=False):
        """返回连接的客户端
        """
        #database = parse_uri(self.uri).get("database")

        if self.ioloop:
            if only_db == False:
                client = AsyncIOMotorClient("/".join(self.uri.split("/")[:-1]), io_loop=self.ioloop)
            else:
                client = AsyncIOMotorClient(self.uri, io_loop=self.ioloop)

        else:
            if only_db == False:
                client = AsyncIOMotorClient("/".join(self.uri.split("/")[:-1]))
            else:
                client = AsyncIOMotorClient(self.uri)
        return client