This release is a pre-release and may not be stable for production use.
PyMilvusModel
Inspired by SQLModel, PyMilvusModel:
is a library for interacting with Milvus databases from Python code, with Python objects.
and follows the same paradigm, using Python type annotations and powered by Pydantic
Installation
pip install milvusmodel.py
Example Usage
from typing import List, Optional
from typing_extensions import Annotated
from pymilvus import MilvusClient, DataType
from pymilvusmodel import MilvusIndexParam, MilvusField, MilvusModel
class ExampleModel(MilvusModel):
indexes: list[MilvusIndexParam] = [
MilvusIndexParam("vector", "IVF_FLAT", "vector_index", metric_type="COSINE", params={
"nlist": 128
})
]
id: Annotated[
Optional[int],
MilvusField(name="id", dtype=DataType.INT64,
is_primary=True, auto_id=True)
] = None
vector: Annotated[
List[float],
MilvusField(name="vector", dtype=DataType.FLOAT_VECTOR, dim=2)
]
MILVUS_CLIENT = MilvusClient("http://localhost:19530")
MilvusModel.metadata.create_all(MILVUS_CLIENT)
print(MILVUS_CLIENT.list_collections()) # ['ExampleModel']
ExampleModel.insert(ExampleModel(vector=[0, 1]))
print(ExampleModel.query(filter="id>=0")) # [ExampleModel(indexes=[<pymilvusmodel.index.MilvusIndexParam object at 0x105c825d0>], id=456328785400861845, vector=[0.0, 1.0])]
Metadata
Release files for milvusmodel.py 0.2.1b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| milvusmodel_py-0.2.1b0.tar.gz | 6.2 kB | With provenance | Details for milvusmodel_py-0.2.1b0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| milvusmodel_py-0.2.1b0-py3-none-any.whl | Python 3 | none | any | Details for milvusmodel_py-0.2.1b0-py3-none-any.whl |
Total release size: 13.8 kB
Release files / milvusmodel_py-0.2.1b0.tar.gz
| Download URL | milvusmodel_py-0.2.1b0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfe5695560444f81e7b6a65bb0df9dde5242d411294a2dbb8d182dc6793fa59a
|
|
BLAKE2b-256 checksum How to use checksums |
68477516ca2bf2d6fd6b5b539798c205474908c7ff7742034030087784a6caa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 6, 2026.
Transparency logRelease files / milvusmodel_py-0.2.1b0-py3-none-any.whl
| Download URL | milvusmodel_py-0.2.1b0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d56ec670609325b8069702d19b5ab5dbdd43fde10b60376b02b827ae4ab7a606
|
|
BLAKE2b-256 checksum How to use checksums |
daae38509ed6af8173375b41437eb05ffca93b70f49269dcdba1d94c2768cfab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 6, 2026.
Transparency logSecurity for milvusmodel.py 0.2.1b0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for milvusmodel_py-0.2.1b0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.