milvus-logo
LFAI
< Docs
  • Python

connect()

This method connects the client to a Milvus connection.

Invocation

connect(alias, **kwargs)

Parameters

ParameterDescriptionTypeRequired
aliasConnection aliasStringTrue
kwargs: hostIP address of the Milvus connection.StringTrue
kwargs: portPort of the Milvus connection.IntegerTrue

Return

No return.

Raises

  • NotImplementedError – error if the handler in connection parameters is not gRPC.
  • ParamError – error if the parameter is invalid.
  • Exception – error if the server specified in parameters is not ready.

Example

from pymilvus import connections
connections.connect(
  alias="default", 
  host='localhost', 
  port='19530'
)
Feedback

Was this page helpful?