milvus-logo
LFAI
< Docs
  • Python

create_database()

This operation creates a database using the provided database name.

Request Syntax

create_database(
    db_name: str,
    using: str,
    timeout: float | None
)

PARAMETERS:

  • db_name (string) -

    [REQUIRED]

    Name of the database to be created.

  • 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:

None

RETURNS:

None

EXCEPTIONS:

None

Examples

from pymilvus import connections, db

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

db.create_database(db_name="test")

Related operations

The following operations are related to create_database():