Pymilvus

Latest version: v2.4.3

Safety actively analyzes 638741 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 10

2.1.3

Fix some bugs

2.1.2

Fix some bugs

2.1.1

Fix some bugs

2.1

1. New APIs

Support RBAC (Role Based Access Control)

Renamed APIs in `utility`

|Methods in 2.1.x| Methods in 2.2.x|
|----------------|-----------------|
|`utility.create_credential` | `utility.create_user` |
|[No change]`utility.reset_password`| `utility.reset_password`
|`utility.update_credential`|`utility.update_password`|
|`utility.delete_credential`|`utility.delete_user`|
|`utility.list_cred_users`|`utility.list_usernames`|
|-|`utility.list_roles`|
|-|`utility.list_user`|
|-|`utility.list_users`|

New class `Role`

- property:
- Role.name
- methods:
- Role.create
- Role.drop
- Role.add_user
- Role.remove_user
- Role.get_users
- Role.is_exist
- Role.grant
- Role.revoke
- Role.list_grant
- Role.list_grants

Support bulk insert data

1. `utility.do_bulk_insert`
2. `utility.get_bulk_insert_state`
3. `utility.list_bulk_insert_tasks`

Add `flush`
1. `Collection.flush()`

2. More functional and compatible APIs
Support search/query pagination
Support collection TTL (Time to Live)

Add *properties* support when init Collection
python
Collection(name="a", data=data, schema=schema, properties={"collection.ttl.seconds": 1800})


3. Enhanced APIs

`num_entities` doesn't invoke `flush` inside
`create_index`:
- doesn't invoke `flush` inside.
- support FLAT, DiskANN, and, AutoIndex index type
- support naming an index
- support to create index for string field

`Collection.drop`:

- doesn't invoke `Collection.release()` and `index.drop()` inside.

4. Removed APIs

1. `calc_distance()`

2.1.0

New Features
Load multiple memory replicas
python
collection.load(replica_number=2)

collection.get_replicas()


Support `VARCHAR` data type

1. You can define `VARCHAR` field in schema, also `VARCHAR` field can be used as primary field:

python
FieldSchema(name="pk", dtype=DataType.VARCHAR, is_primary=True, auto_id=False, max_length=100)


2. Just like other data type, you can insert string into `VARCHAR` field:

python
entities = [
[str(i) for i in range(num_entities)],
]
insert_result = collection.insert(entities)


3. You can also choose to build index for `VARCHAR` field, for now, the only supported index for string is `Trie`:

python
collection.create_index(field_name="pk", index_name="index_on_varchar")


4. Just like other data type, scalar filtering expression on `VARCHAR` field is also supported, besides basic filters, prefix match is also supported. Please visist `milvus.io` for more detailed information.

5. `VARCHAR` field as output fields is also supported when you are about to do a search or query:

python
res = collection.query(expr='pk > "str"', output_fields=["pk"])


Support to specify index name for index-related operations

Now, you can specify index name when you create index for field.

python
collection.create_index(field_name="field", index_name="index_name", index_params={})
collection.drop_index(index_name="index_name")


For backward compatibility, if you don't specify the index name, `_default_idx` will be used.

Support Basic Authentication

We add some APIs to support basic authentication:

- create_credential
- update_credential
- delete_credential
- list_cred_users

If there are any users in Milvus server, then the `user` and `password` are required to setup a connection:

python
connections.connect(host="host", port="port", user="user", password="password")


For more detailed information, please refer to [mep27](https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication).

Support tls in RPC

Besides basic authentication, we also support to tls in RPC, you can setup a secure connection.

For one-way tls:

python
connections.connect(host=_HOST, port=_PORT, secure=True, server_pem_path="server.pem", server_name="localhost")


For two-way tls:

python
connections.connect(host=_HOST,
port=_PORT,
secure=True,
client_pem_path="client.pem",
client_key_path="client.key",
ca_pem_path="ca.pem",
server_name="localhost")


Enhancement
1. Extend version range of grpcio and ujson
2. Add milvus-proto as submodule
3. Support full uri in connection
python
connections.connect(alias="test", uri="https://example.com:19530")

2.0.2

**Release date**: 2022-04-02

Features:

- Add support for numpy.ndarray for vector field (937)

Fixed bugs:

- Fix pymilvus unable to download on python3.8 (931)
- Fix loading progress output (936)

Enhancements:

- Remove load balance from doc (929)
- Fix readme bug (934)
- Fix create_partition doc string (935)

Page 6 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.