跳到主要内容
版本:v2.5.x

list_database()

This operation returns a list of database names from the connected Milvus instance.

Python
list_database(
using: str,
timeout: float | None
)

Request Syntax

Python
from pymilvs import db

db.list_database()

PARAMETERS:

  • using (string) -

    Alias of the connection. Defaults to default.

  • timeout (float | None)

    The timeout duration for this operation. Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.

RETURN TYPE:

List

RETURNS:

A list of database names.

EXCEPTIONS:

None

Examples

Python
from pymilvus import connections, db

conn = connections.connect(
host="127.0.0.1",
port=19530
)

db.list_database()

# Output
# ["default", "test"]

The following operations are related to list_database():