🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

milvus-logo
LFAI
< Docs
  • Python

connect()

This method connects the client to a Milvus connection.

Invocation

connect(alias, **kwargs)

Parameters

ParameterDescriptionTypeRequired
aliasConnection alias.StringTrue
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'
)

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?