Skip to main content

CLI for Milvus

Project description

Milvus_CLI๐Ÿš€

GitHub release (latest by date including pre-releases) PyPI PyPI - Downloads GitHub release (latest by date including pre-releases) Docker Pulls GitHub repo size PyPI - License

Overview

Milvus Command Line Interface based on Milvus Python SDK.

  • Applicable to most platforms: MS Windows, macOS, Ubuntu

  • Support pip install & offline installation package

  • Support single executable file

  • Milvus Python SDK full function coverage

  • Built-in help function

  • Support auto completion

Project Structure

milvus_cli/
โ”œโ”€โ”€ Core Modules
โ”‚   โ”œโ”€โ”€ main.py          # Main entry point
โ”‚   โ”œโ”€โ”€ Cli.py           # CLI command interface
โ”‚   โ”œโ”€โ”€ Connection.py    # Milvus connection management
โ”‚   โ”œโ”€โ”€ Collection.py    # Collection operations
โ”‚   โ”œโ”€โ”€ Database.py      # Database management
โ”‚   โ”œโ”€โ”€ Index.py         # Index management
โ”‚   โ”œโ”€โ”€ Partition.py     # Partition management
โ”‚   โ”œโ”€โ”€ Data.py          # Data import/export
โ”‚   โ”œโ”€โ”€ Role.py          # Role management
โ”‚   โ”œโ”€โ”€ User.py          # User management
โ”‚   โ”œโ”€โ”€ Alias.py         # Alias management
โ”‚   โ”œโ”€โ”€ Fs.py            # File system operations
โ”‚   โ”œโ”€โ”€ Types.py         # Data type definitions
โ”‚   โ”œโ”€โ”€ utils.py         # Utility functions
โ”‚   โ””โ”€โ”€ Validation.py    # Input validation
โ”œโ”€โ”€ scripts/             # CLI command implementations
โ”‚   โ”œโ”€โ”€ milvus_cli.py    # Main CLI script
โ”‚   โ”œโ”€โ”€ connection_cli.py # Connection-related commands
โ”‚   โ”œโ”€โ”€ collection_cli.py # Collection-related commands
โ”‚   โ”œโ”€โ”€ database_cli.py  # Database-related commands
โ”‚   โ”œโ”€โ”€ index_cli.py     # Index-related commands
โ”‚   โ”œโ”€โ”€ partition_cli.py # Partition-related commands
โ”‚   โ”œโ”€โ”€ data_cli.py      # Data-related commands
โ”‚   โ”œโ”€โ”€ role_cli.py      # Role-related commands
โ”‚   โ”œโ”€โ”€ user_cli.py      # User-related commands
โ”‚   โ”œโ”€โ”€ alias_cli.py     # Alias-related commands
โ”‚   โ””โ”€โ”€ helper_cli.py    # Helper commands
โ”œโ”€โ”€ test/                # Unit tests (internal APIs)
โ”‚   โ”œโ”€โ”€ test_config.py
โ”‚   โ”œโ”€โ”€ test_connection_client.py
โ”‚   โ”œโ”€โ”€ test_collection_client.py
โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ tests/               # Integration tests (CLI commands)
    โ”œโ”€โ”€ conftest.py
    โ”œโ”€โ”€ test_connection.py
    โ”œโ”€โ”€ test_collection.py
    โ””โ”€โ”€ ...

Core Components

  • Core Modules: Implement the main functionality logic of Milvus CLI, each module handles specific Milvus feature domains
  • scripts/: Contains all CLI command implementations, providing user interaction interfaces
  • milvus_cli/test/: Unit tests for internal Python modules and classes
  • tests/: Integration tests for CLI commands and user interface

Installation methods

๐Ÿ”Install in a Python environment

Prerequisites

Python >= 3.8.5

Install from PyPI (Recommended)

Run pip install pymilvus>=2.5.0 Run pip install milvus-cli==1.0.2

Install from a tarball

  1. Download the latest release of milvus_cli-<version>.tar.gz.
  2. Run pip install milvus_cli-<version>.tar.gz.

Install from source code

  1. Run git clone https://github.com/zilliztech/milvus_cli.git.
  2. Run cd milvus_cli.
  3. Run pip install --editable .

Docker image in docker hub

docker run -it zilliz/milvus_cli:latest

Usage

Run milvus_cli (in a Python environment) or double click milvus_cli-<version>.exe file (in a Windows environment).

Run Milvus_CLI

  • In a Python environment, run milvus_cli.

Document

https://milvus.io/docs/cli_commands.md

Testing

This project has two types of tests:

Integration Tests (CLI Commands)

Test the command-line interface and user experience.

# Run all integration tests
source venv/bin/activate
python run_tests.py --uri http://localhost:19530

# Or use pytest directly
MILVUS_URI=http://localhost:19530 pytest tests/ -v

See TESTING.md for detailed guide.

Unit Tests (Internal APIs)

Test Python modules and classes directly.

# Run all unit tests
python -m unittest discover milvus_cli/test

# Run specific test
python -m unittest milvus_cli.test.test_connection_client

See milvus_cli/test/README.md for configuration details.

Community

๐Ÿ’ฌ Community isnโ€™t just about writing code together. Come join the conversation, share your knowledge and get your questions answered on Milvus Slack Channel!

Miluvs Slack Channel






Project details


Download files

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

Source Distribution

milvus_cli-1.2.0.tar.gz (90.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

milvus_cli-1.2.0-py3-none-any.whl (124.8 kB view details)

Uploaded Python 3

File details

Details for the file milvus_cli-1.2.0.tar.gz.

File metadata

  • Download URL: milvus_cli-1.2.0.tar.gz
  • Upload date:
  • Size: 90.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for milvus_cli-1.2.0.tar.gz
Algorithm Hash digest
SHA256 23db5af9a5ae5095090e65f34a0869027d320e7ac27eeddc63e4ed24037bab74
MD5 55668265455b4fcbbcf3c5202b3f8120
BLAKE2b-256 205b4966ae3bed011ae29c40a7352eeb38eb6cc763aa181ef982d6c83262b8d9

See more details on using hashes here.

File details

Details for the file milvus_cli-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: milvus_cli-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 124.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for milvus_cli-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bda45fa47d2fad19355a9cc35c7aec1f4e692d19b431536980917e44cec3a6c7
MD5 99dfba0b7e30f5734f7c4d29afb2fe56
BLAKE2b-256 9f4d35e368a4ef37885df7e9b3c2e25603b79e95df8ae6b79d0e1814f602be8c

See more details on using hashes here.

Supported by

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