Skip to main content

Python Milvus Server

Project description

Python Milvus Server

PyPI Version

Milvus server started by python

Currently, windows/linux with x86_64, and macOS with arm64 is supported.

Installation

You could simply install it with pip:

pip install python-milvus-server

or with a specific version

pip install python-milvus-server==2.2.3

or install it from the source.

Install from source

Windows

Currently, Milvus windows is build with MSYS2, so please follow below steps for build and install this Milvus server for windows.

  • Install MSYS2, currently please use msys2-base-x86_64-20220603, which could be found at MSYS2 Install Release
  • In MINGW64 console, run the prebuild scripts: sh run-prebuild.sh, after that, you could find all needed dll files under folder milvus/bin
  • Using setup.py to install python-milvus-server
    • python setup.py install to install it.
    • python setup.py bdist_wheel to build binary package (wheel and setuptools is required).

Linux

Currently, compile milvus on linux requires install some dependencies, so we create a docker for build the milvus executable.

  • On any linux with python3 installed, docker is installed and started.
  • run the prebuild scripts: bash run-prebuild.sh, after that, you should find all needed binaries under folder milvus/bin
  • Using setup.py to install python-milvus-server
    • python setup.py install to install it.
    • python setup.py bdist_wheel to build binary package (wheel and setuptools is required).

macOS

Similar with under Linux, but you need to install the dependencies on your macos by yourself. It could be done with scripts/install_deps.sh from milvus.

Usage

You could load the default_server and start it.

from milvus_server import default_server
from pymilvus import connections

# Optional, if you want store all related data to specific location
# default it wil using:
#   %APPDATA%/milvus-io/milvus-server on windows
#   ~/.milvus-io/milvus-server on linux
default_server.set_base_dir('D:\\test_milvus')

# Optional, if you want cleanup previous data
default_server.cleanup()

# star you milvus server
default_server.start()

# Now you could connect with localhost and the port
# The port is in default_server.listen_port
connections.connect(host='127.0.0.1', port=default_server.listen_port)

You could see example.py for a full example.

Some advanced topic

Debug startup

You could use debug_server instead of default_server for checking startup failures.

from milvus_server import debug_server

and you could also try create server instance by your self

from milvus_server import MilvusServer

server = MilvusServer(debug=True)

Multiple instance

Yes, we support multiple milvus server instance. Currently windows only(due to pid file path is hardcoded on linux) note: as by default they're using the same data dir, you set different data dir for each instances

from milvus_server import MilvusServer

server1 = MilvusServer()
server2 = MilvusServer()

# this is mandatory
server1.set_base_dir('d:\\test_1')
server2.set_base_dir('d:\\test_2')

Context

You could close server while you not need it anymore. Or, you're able to using with context to start/stop it.

from milvus_server import default_server

with default_server:
    # milvus started, using default server here
    ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

python_milvus_server-2.2.3.post5-py3-none-win_amd64.whl (38.4 MB view details)

Uploaded Python 3 Windows x86-64

python_milvus_server-2.2.3.post5-py3-none-macosx_11_0_arm64.whl (23.9 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

File details

Details for the file python_milvus_server-2.2.3.post5-py3-none-win_amd64.whl.

File metadata

  • Download URL: python_milvus_server-2.2.3.post5-py3-none-win_amd64.whl
  • Upload date:
  • Size: 38.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for python_milvus_server-2.2.3.post5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9b1a44f7f9af4daaba5bd94ad8fdcc0d8fa5ccc12f17ff96441a31d481d8aa02
MD5 c401e90ec6d95f28fe9dcfd068366c19
BLAKE2b-256 0bba38feaf556bc9c0f75fad1c0ef5737eff43bc265f01e24c58464acf70d86b

See more details on using hashes here.

File details

Details for the file python_milvus_server-2.2.3.post5-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: python_milvus_server-2.2.3.post5-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 39.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for python_milvus_server-2.2.3.post5-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a458e4373e0651f456e9501f7ae916f733a9d4baee9a2d8802b1374a7243983
MD5 c94177b6e07d9d9c902c7d5bd3811732
BLAKE2b-256 64bfc5822b89463a76e367a29c206a5d8c92e14b414d78895ee583ebf123e215

See more details on using hashes here.

File details

Details for the file python_milvus_server-2.2.3.post5-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_milvus_server-2.2.3.post5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2215cad9970ab2d698910fe25aec855678e0e0e666cc77053718964fc976f44d
MD5 a9e1d25be1662b6aad2b17b07c78f20f
BLAKE2b-256 ec4db76f3dd5fcbb1897c47a4d0e65a0840b0744817b8a3707fcfd50cadd57ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page