CLI for Milvus
Project description
Milvus_CLI๐
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
- Download the latest release of
milvus_cli-<version>.tar.gz. - Run
pip install milvus_cli-<version>.tar.gz.
Install from source code
- Run
git clone https://github.com/zilliztech/milvus_cli.git. - Run
cd milvus_cli. - 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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23db5af9a5ae5095090e65f34a0869027d320e7ac27eeddc63e4ed24037bab74
|
|
| MD5 |
55668265455b4fcbbcf3c5202b3f8120
|
|
| BLAKE2b-256 |
205b4966ae3bed011ae29c40a7352eeb38eb6cc763aa181ef982d6c83262b8d9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bda45fa47d2fad19355a9cc35c7aec1f4e692d19b431536980917e44cec3a6c7
|
|
| MD5 |
99dfba0b7e30f5734f7c4d29afb2fe56
|
|
| BLAKE2b-256 |
9f4d35e368a4ef37885df7e9b3c2e25603b79e95df8ae6b79d0e1814f602be8c
|