Commit Graph

106 Commits

Author SHA1 Message Date
George
9f9c500bf4 Merge branch 'dev' into drop-python3.9 2025-12-04 11:58:23 +07:00
George
458646cb95 tests: speed up tests (#1130)
* fix: do not try to check compatibility in test_client_init

* tests: remove sparse-code vectors (10_000 dim), remove euclid recommend methods as non-applicable for sparse

* tests: add payload indexes to query group test

* debug: add durations=0 to pytest

* debug: test only test query group

* debug: try adding payload indexes to query group test

* rollback test launch
2025-12-04 11:22:46 +07:00
George Panchuk
baf2d0e303 new: replace optional and union with | 2025-12-02 12:08:55 +07:00
George
fc6ce2f587 Merge branch 'dev' into drop-python3.9 2025-12-02 11:51:15 +07:00
George
fddf1185ae new: expose the remaining cluster methods (#1123)
* new: expose the remaining cluster methods

* fix: fix type hints

* new: add deadline info to the first hw

* fix: fix review comments
2025-11-24 20:02:44 +07:00
George
9ce7346e05 new: convert cluster operations to grpc (#1116)
* new: convert cluster operations to grpc

* fix: rollback coverage html

* fix: address ai comments

* fix: address review comments
2025-11-20 13:38:17 +07:00
George Panchuk
47b9a83580 Merge branch 'dev' into drop-python3.9 2025-11-18 01:54:26 +07:00
George
f2e0e22a17 new: expose cluster operations (#1114)
* new: expose cluster operations

* fix: fix cluster collection update return result, add tests

* fix test

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-11-14 20:20:22 +01:00
George
27acfd0d75 new: remove vectors_count, update http and grpc models (#1069)
* new: remove vectors_count, update http and grpc models

* fix: update inspection cache

* new: add conversions and update interface

* fix: fix some conversions

* fix: fix typo

* fix: fix isinstance

* fix: regen async

* fix: fix update_filter usage, fix isinstance

* tests: collection metadata test

* fix: address backward compatibility in test

* new: update models, add max payload index count and copy vectors

* fix; update _inspection_cache

* new: add read consistency to count points

* Allow uuids in interface (#1085)

* new: direct uuid support

* tests: add uuid tests

* fix: update inspection cache

* new: add collection metadata and tests to local mode (#1089)

* new: add collection metadata and tests to local mode

* fix: regen async client

* new: implement parametrized rrf in local mode (#1087)

* new: implement parametrized rrf in local mode

* refactoring: use a variable for a magic value

* fix: adjust conversion according to AI

* Update filter (#1090)

* new: add missing update_filter, implement it in local mode

* fix: fix type hint, fix update operation, fix rest uploader, add tests

* fix: fix update filter is None case

* fix: mypy was not a good boy

* Text any filter (#1091)

* new: add match text any local mode

* tests: add match text any tests

* new: update models, remove init_from and locks (#1100)

* new: update models, remove init_from and locks

* deprecate: remove init from tests

* deprecate: remove lock tests

* new: convert ascii_folding

* fix: fix type stub

* new: convert acorn

* new: convert shard key with fallback

* new: update grpcio and grpcio tools in generator (#1106)

* new: update grpcio and grpcio tools in generator

* fix: bind grpcio and tools versions to 1.62.0 in generator

* Remove deprecated methods (#1103)

* deprecate: remove old api methods

* deprecate: remove type stub for removed methods

* deprecate: remove old api methods from test_qdrant_client

* deprecate: replace search with query points in test_in_memory

* deprecate: replace search methods in fastembed mixin with query points

* deprecate: replace old api methods in test async qdrant client

* deprecate: replace search with query points in test delete points

* deprecate: replace discover and context with query points in test_discovery

* deprecate: replace recommend_groups with query_points_groups in test_group_recommend

* deprecate: replace search_groups in test_group_search

* deprecate: replace recommend with query points in test_recommendation

* deprecate: replace search with query points in test search

* deprecate: replace context and discover with query points in test sparse discovery

* deprecate: replace search with query points in test sparse idf search

* deprecate: replace recommend with query points in test sparse recommend

* deprecate: replace search with query points in test sparse search

* deprecate: replace missing search request with query request in qdrant_fastembed

* deprecate: replace search with query points in test multivector search queries

* deprecate: replace upload records with upload points in test_updates

* deprecate: remove redundant structs (#1104)

* deprecate: remove redundant structs

* fix: do not use removed conversions in local mode

* fix: remove redundant conversions, simplify types.QueryRequest

* deprecate: replace old style grpc vector conversion to a new one (#1105)

* deprecate: replace old style grpc vector conversion to a new one

* fix: ignore union attr in conversion

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: generall <andrey@vasnetsov.com>

* new: deprecate add, query, query_batch in fastembed mixin (#1102)

* new: deprecate add, query, query_batch in fastembed mixin

* 1.16 -> 1.17

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: generall <andrey@vasnetsov.com>

* new: yet another update

* new: add initial_state to create shard key (#1109)

* chore: remove obsolete imports

* fix: add metadata parameter to recreate collection in local

* fix: fix metadata handling in local more

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-11-14 17:01:17 +07:00
George Panchuk
698db1d33f new: drop python3.9, replace union and optional with | where possible 2025-11-14 03:20:36 +07:00
George
2529d21185 new: add initial_state to create shard key (#1109) 2025-11-13 14:12:57 +01:00
George
ff7f584d33 new: update models, remove init_from and locks (#1100)
* new: update models, remove init_from and locks

* deprecate: remove init from tests

* deprecate: remove lock tests

* new: convert ascii_folding

* fix: fix type stub

* new: convert acorn

* new: convert shard key with fallback

* new: update grpcio and grpcio tools in generator (#1106)

* new: update grpcio and grpcio tools in generator

* fix: bind grpcio and tools versions to 1.62.0 in generator

* Remove deprecated methods (#1103)

* deprecate: remove old api methods

* deprecate: remove type stub for removed methods

* deprecate: remove old api methods from test_qdrant_client

* deprecate: replace search with query points in test_in_memory

* deprecate: replace search methods in fastembed mixin with query points

* deprecate: replace old api methods in test async qdrant client

* deprecate: replace search with query points in test delete points

* deprecate: replace discover and context with query points in test_discovery

* deprecate: replace recommend_groups with query_points_groups in test_group_recommend

* deprecate: replace search_groups in test_group_search

* deprecate: replace recommend with query points in test_recommendation

* deprecate: replace search with query points in test search

* deprecate: replace context and discover with query points in test sparse discovery

* deprecate: replace search with query points in test sparse idf search

* deprecate: replace recommend with query points in test sparse recommend

* deprecate: replace search with query points in test sparse search

* deprecate: replace missing search request with query request in qdrant_fastembed

* deprecate: replace search with query points in test multivector search queries

* deprecate: replace upload records with upload points in test_updates

* deprecate: remove redundant structs (#1104)

* deprecate: remove redundant structs

* fix: do not use removed conversions in local mode

* fix: remove redundant conversions, simplify types.QueryRequest

* deprecate: replace old style grpc vector conversion to a new one (#1105)

* deprecate: replace old style grpc vector conversion to a new one

* fix: ignore union attr in conversion

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: generall <andrey@vasnetsov.com>

* new: deprecate add, query, query_batch in fastembed mixin (#1102)

* new: deprecate add, query, query_batch in fastembed mixin

* 1.16 -> 1.17

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-11-11 21:17:08 +07:00
George
a0b5a11aba new: add collection metadata and tests to local mode (#1089)
* new: add collection metadata and tests to local mode

* fix: regen async client
2025-10-31 18:06:55 +07:00
George Panchuk
3249d9432b fix: address backward compatibility in test 2025-10-29 16:39:07 +07:00
George Panchuk
921efc0379 tests: collection metadata test 2025-10-29 16:39:07 +07:00
Tim Visée
bf515ae2d7 Change user agent to python-client (#1028) 2025-06-24 14:07:07 +02:00
George
808b0abb2d Fix urljoin (#996)
* fix: fix urljoin usage

* fix: do not modify rest_uri, add tests
2025-05-21 14:46:10 +04:00
George
8632844582 fix: init_options should not crush with unpickleable objects (#993)
* fix: init_options should not crush with unpickleable objects

* fix: regen async

* fix: do not deepcopy kwargs

* Update tests/test_qdrant_client.py

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-05-20 14:45:54 +04:00
tellet-q
635457b47c new: Support for too many requests (#914)
* Update grpc client

* Update rest client and add new exception

* Ensure uploaders continue after wait

* Update

* Address coderabitai review

* Fix tests

* Re-generate clients

* Address review

* Revert attempt handling

* Add new exception

* Add tests

* Do not throw ResourceQuotaExceeded

* Add support for async grpc

* Remove iscoroutine check and more

* update models

* Address some coderabbitai comments

* Address review

* Fix test

* Fix backwards compatibility tests

* Address review

* Get rid of redundant code

* Address ai review

* refactoring: refactor tests

* refactoring: do not inherit resource exhausted from aiorpcerror

* fix: remove redundant import

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2025-03-24 18:05:15 +03:00
Arnaud Gourlay
553b004065 strict mode tests
* Fix backward compatibility strict mode

* Basic test for strict mode

* remove backward compat patch test from ci

* tests: update strict mode test

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2025-03-17 13:10:19 +03:00
Andrey Vasnetsov
d8951c5dae add tests and fix field schema conversion in case grpc is used (#910)
* add tests and fix field schema conversion in case grpc is used

* regen async client
2025-03-06 12:34:52 -03:00
Andrew Rove (Rover)
349b35bb44 Fix for if a path is given for a remote client URL it is stored as the prefix and not discarded. (#876)
* Fix for if a path is given for a remote client URL it is stored as the prefix.

Though there is an error thrown if the prefix argument and url path are both present.

* refactoring

* refactoring

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2025-01-07 14:59:20 +01:00
Dmitrii Ogn
3fbdf04f9e Removed async_grpc (#866)
* Removed async_grpc

* Removal of asyncio

* Return needed test

* Proper fix of renaming

---------

Co-authored-by: d.rudenko <dimitriyrudenk@gmail.com>
2024-12-27 14:46:18 +01:00
tellet-q
b99ea6eb42 feat: incompatible versions warning on init (#859)
* Add flag to compare server and client versions during remote client init

* Always use sync http request to check versions

* Use simple httpx.get

* Add more tests

* Update docstring
---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-12-16 11:33:31 +01:00
tellet-q
ebc358c634 new: Send client version to server in headers (#861)
* new: Send client version in request's headers (http and gRpc)
2024-12-05 08:08:50 +01:00
George
baa3e264c8 Drop python 3.8 (#848)
* new: drop python 3.8 support, update type hints

* fix: remove 3.8 from ci

* fix: update type hints

* fix: make netlify use python3.10

* fix: try python3.9 for sphinx

* debug: try updating sphinx

* new: bump ffastembed to 0.4.2

* fix: install numpy<2 for mypy

* fix: install numpy via poetry
2024-11-15 15:54:32 +01:00
George
2bd4f7ab94 Fix grpc payload index params (#773)
* fix: update grpc parametrized payload index

* fix: optional lookup and range for integer payload index

* tests: add tests

* fix: remove updates which are too early for the time

* chore: add newline
2024-09-13 17:38:32 +02:00
Hossam Hagag
97e317e1f1 improved semver comparison (#736)
* refactor: Improved semver comparision in tests

refs: #723

* refactor: Improved semver comparision in tests

* refactor: Refactored semver comparision in recommend
2024-08-23 19:35:34 +02:00
George
72f776977a fix: fix conversion in create_payload_index, add tests (#750)
* fix: fix conversion in create_payload_index, add tests

* fix: fix backward compatibility tests
2024-08-22 15:52:27 +02:00
George
04845eeba0 new: remove default hybrid search for query_points with fastembed (#735)
* new: remove default hybrid search for query_points with fastembed

* tmp: disable query extension for vector input, etc
2024-08-12 16:14:32 +02:00
Hossam Hagag
c92a0432f3 Refactor recreate collection (#719)
* deprecated recreate_collection from tests

* checked if collection exists before deletion

* reverted deletion of recreate_collection

* added missing collection_exsits before deletion

* nit if condition

* fix type hint in local_collection

* removed run mypy on async client generator

* added checks for create_collection if exists

* nit change collection name

* add else to create_collection

* nit

* nit

* refactoring: remove redundant checks

* fix: do not test collection_exists through itself

* refactoring: remove redundant collection exists checks

* fix: remove redundant collection exists checks

* refactoring: remove redundant collection checks

* refactoring: remove redundant collection existence check in test sparse search

* refactoring: remove redundant checks in test_updates

* refactoring: remove redundant checks

* fix: remove redundant checks

* refactoring: remove redundant checks

* refactoring: remove redundant imports

* new: add recreate collection test

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-08-09 23:33:31 +02:00
George
9a9fb0c1a4 chore: remove qdrant_openapi_client directory (#731)
* chore: remove qdrant_openapi_client directory

* fix: remove qdrant_openapi_client from pyproject.toml

* chore: finish deletion
2024-08-09 21:26:05 +02:00
Anush
a0d263e6e6 chore: Added init_options property (#541)
* chore: Added init_options property

* refactor: @property

* test: init_opts

* chore: regen async client again with Py 3.10

* chore: deepcopy kwargs
2024-07-17 18:30:02 +03:00
George
00d40c8b2c new: add query interface tests, fix version checking (#670)
* new: add query interface tests, fix version checking

* fix: add missing file
2024-06-28 20:49:32 +02:00
Olli-Pekka Heinisuo
d957ca7ba7 Feat: bearer token authentication support (#591)
* bearer token authentication provider support

* add tests and checks, move auth file to separate dir

* fix error message

* remove locks

* rename var

* refactoring: refactor exceptions, fix mypy

* fix: regen async

* tests: extend token tests to check token updates

* new: add warning when auth token provider is used with an insecure connection

* fix: propagate auth token to rest client even with prefer_grpc set

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-04-16 15:42:21 +02:00
George
12141f61e6 fix: prevent access to a closed instance methods in local mode (#594)
* fix: prevent access to a closed method instance in local mode

* fix: regen async
2024-04-15 20:00:08 +02:00
Apostolos Matsagkas
fdcbf41ba8 fix: Fix read consistency when performing batch search (#589)
* Fix read consistency when performing batch search

* fix: regen async

* fix: add tests to check read consistency

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-04-10 18:11:09 +02:00
George
9221338fcc new: propagate timeout from methods to httpx (#534)
* new: propagate timeout from methods to httpx

* refactor: refactor timeout propagation (#535)

* tests: add timeout test

* refactor: remove redundant kwargs
2024-03-13 21:01:24 +01:00
George
462e6cea1c new: add collection exists interface (#518)
* new: add collection exists interface

* tests: fix version comparison

* tests: add collection exists type stub, add async test
2024-03-02 23:03:49 +01:00
George
bc714a5521 new: add min should clause (#519)
* new: add min should clause

* fix: local mode fix payload filter type hint

* tests: extend conversion

* fix: fix param name

* fix: fix grpc structure, update name
2024-03-02 22:46:53 +01:00
Armaghan
3ad05b3671 feat: Expose Setting for GRPC Channel-Level Compression at Client Side (#480)
* expose grpc channel-level compression settings in base functions

* expose grpc channel-level compression settings in remote classes

* expose grpc channel-level compression settings in client

* raise TypeError for compression

* added test cases for grcp channel-level compression

* move grpc_compression parameter from client's signature to **kwargs

* use grpc.Compression instead of creating new enum qdrant.grpc.Compression in qdrant/grpc/__init__.py

* refactor grpc_compression type hint

* fix: Compression instead of grpc.Compression in type hint

* tests: move and update tests

* chore: remove magic method

* fix: fix async client generator, update precommit dependencies

* fix: update isort options

* fix: update dev dependencies

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-03-01 18:31:16 +01:00
Luis Cossío
332777db2a Local mode of order_by parameter in scroll + datetime support (#491)
* generate rest client (only points_api)

* generate grpc client (points part only)

* add local mode implementation

* update collections_api.py

* add grpc conversions

* fix problematic StartFrom Union order

* add basic congruence test

* route order_by in qdrant clients

* fix local mode `start_from` logic

* add library stubs for dateutil

* generate async client

* generate the rest of the rest client 👻

* test datetime values too

* add int Range and int StartFrom

* update points.proto and points_pb2.py

* fix conversion of range interface

* add conversion fixtures and use better conversion of datetime to timestamp

* remove integer range

* restore `value_by_key()`

* OrderBy grpc to rest conversions

* generate async client

* use `OrderByInterface` instead of only `OrderBy`

* - use equivalent qdrant core datetime parsing,
- use type alias for OrderingValue, instead of custom class,
- better random date generation

* Drop custom datetime parser implementation

* nit fixes

* fix flakiness of the congruence test by subsorting

* better datetime to timestamp conversion

* uncomment conversion fixtures, add Direction

* restore poetry.lock and remove dateutil dep

* poetry lock --no-update

* rename datetime.py to datetime_utils.py

* add StrictInt to StartFrom union

* use more date formats in fixtures

* move conversion test to `test_validate_conversions.py`

* drop `%:z` formats

* add more complex timezones to payload fixtures, fix deserialization

* update datetime parsing test
2024-03-01 09:51:39 -03:00
Arnaud Gourlay
6df4bd076a Fix gRPC conversion for sparse search batch (#484)
* Fix gRPC convertion for sparse search batch

* fix conversion & add test
2024-02-08 18:18:56 +01:00
George
4adbabec7e fix: fix implicit ids in upload collection with paralell > 1 (#460)
* fix: fix implicit ids in upload collection with paralell > 1

* fix: fix type hints

* fix: remove redundant code, simplify type hints

* fix: remove redundant import

* fix: fix batching

* fix: replace generator with list comprehension

* fix: sorry, I was wrong

* tests: update tests

* fix: extend upload records and upload points tests
2024-01-31 16:38:07 +01:00
George
a2adc2d2ad new: deprecate upload records, update tests, prohibit migration of co… (#447)
* new: deprecate upload records, update tests, prohibit migration of collections with custom shards

* Update qdrant_client/qdrant_client.py

* Update qdrant_client/async_qdrant_client.py

* new: replace autogenerated int ids with uuids (#448)

* fix: remove redundant kwargs

* fix: regen async

* fix: remove redundant import

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-01-19 20:11:31 +01:00
George
3e7c743e06 new: add shard keys to upload_collection and upload_records (#396)
* new: add shard keys to upload_collection and upload_records

* fix: update async client, update type hint

* new: remove split by batch (#422)

* new: remove split by batch

* fix: fix type hints, remove redundant arg

* fix: fix mypy

* new: ignore shard keys from records

* new: add warning if shard key is set in records in upload_records
2024-01-05 20:55:26 +01:00
George
934b4f65d3 new: expose grpc options in client (#401)
* new: expose grpc options in client

* fix: fix type hint

* tests: add test for grpc options
2024-01-04 11:16:06 +01:00
Arnaud Gourlay
b7e8e459a2 New public sparse vector configuration (#393)
* New public sparse vector configuration

* regen

* fix stubs

* fix test

* conversions

* fix conversion

* apply api changes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-12-06 20:13:46 +01:00
Andrey Vasnetsov
dd4b91c23e Manhattan and shard key (#391)
* support for manhattan distance

* conversion for shard_key_selector

* use shard_key_selector in read api

* allow shard_keys

* regen async

* fix tests

* type checker

* type checker

* tests for custom sharding

* async

* review fixes

* review fixes

* review fixes
2023-12-04 17:05:27 +01:00
Arnaud Gourlay
016032c28f Sparse vectors API and local mode (#378)
* draft

* thread sparse_vectors_config through

* test ingest sparse data

* make async_client consistent for create collection

* regen async

* align client hierarchy

* do not give up

* disable async consistency check for now

* regen

* workaround async client breakage

* generate gRPC

* new healtcheck proto files

* fix gen branch

* fix grpc generation - had to reinstall to downgrade grpcio

* bump test docker image

* wait for update when migrating

* regen REST + update config

* add sparse search congruence

* congruence scroll sparse vectors

* congruence test retrieve sparse

* more sparse tests and waiting on remote

* remove healthcheck service

* misc

* reinstate len check

* fix scoring if no overlap

* sparse distance as numpy float without rounding

* fix payload selector

* fix payload exclude

* dedicated collection name to not collide with openapi engine tests

* fix with_vector, scoring no overlap, closeness assetion

* convert float only once

* regen gRPC to exclude health_check

* code review cleanup

* validate and sort sparse vector before persistence

* regen REST

* test deletes and update with fix

* fix async client

* fix batch size

* fix async client

* don't give up

* remove validated todo

* fix sparse vectors loading test

* fix sparse vectors loading test

* rm empty

* mention sparse vectors in the fake local info

* fix upload collection wait propagation

* fix async. init_from tests

* resync async

* rework test sparse vector generation

* regen clients

* update to dev

* update REST models

* async client

* do not change it yet

* fix migration test

* do not create a sparse configuration by default

* fix backward compatibility by disabling serialization of none fields

* fix type imports

* regen gRPC

* test BatchVectorStruct REST to gRPC conversion

* test gRPC->REST conversion

* sparse grpc tests and conversions fix

* generate async client

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-12-02 20:45:49 +01:00