meilisearch-python-sdk 7.2.3__tar.gz → 7.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/docs_publish.yml +2 -2
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/nightly_testing.yml +2 -2
- meilisearch_python_sdk-7.4.0/.github/workflows/prek_update.yml +36 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/pypi_publish.yml +2 -2
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/testing.yml +20 -18
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/PKG-INFO +7 -2
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/README.md +6 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docker-compose.https.yml +1 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docker-compose.yml +1 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/index.md +15 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/json_handler.md +3 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_client/_async_client.py +1 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_client/_base_client.py +12 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_client/_client.py +1 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_client/_common.py +3 -0
- meilisearch_python_sdk-7.4.0/meilisearch_python_sdk/_version.py +1 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/index/_common.py +7 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/index/async_index.py +89 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/index/index.py +84 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/search.py +5 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/settings.py +6 -0
- meilisearch_python_sdk-7.4.0/prek.toml +53 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/pyproject.toml +6 -6
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/conftest.py +14 -3
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_async_client.py +18 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_async_index.py +43 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_client.py +18 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_index.py +43 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/uv.lock +183 -183
- meilisearch_python_sdk-7.2.3/.pre-commit-config.yaml +0 -30
- meilisearch_python_sdk-7.2.3/meilisearch_python_sdk/_version.py +0 -1
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/FUNDING.yml +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/release-draft-template.yaml +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/renovate.json5 +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/release-drafter.yml +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.gitignore +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/CONTRIBUTING.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/LICENSE +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/assets/add_in_batches.png +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/assets/searches.png +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/codecov.yml +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/datasets/small_movies.json +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/.nojekyll +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/CNAME +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/async_client_api.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/async_index_api.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/client_api.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/css/custom.css +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/decorators_api.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/index_api.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/js/umami.js +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/overrides/partials/footer.html +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/plugins.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/docs/pydantic.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/.gitignore +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/README.md +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/__init__.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/add_documents_decorator.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/add_documents_in_batches.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/async_add_documents_decorator.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/async_add_documents_in_batches.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/async_documents_and_search_results.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/async_search_tracker.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/async_update_settings.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/documents_and_search_results.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/fastapi_example.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/orjson_example.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/pyproject.toml +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/requirements.txt +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/search_tracker.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/tests/__init__.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/tests/conftest.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/tests/test_async_examples.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/tests/test_examples.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/examples/update_settings.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/justfile +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/__init__.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_batch.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_client/__init__.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_http_requests.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_task.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/_utils.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/decorators.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/errors.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/index/__init__.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/json_handler.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/__init__.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/batch.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/client.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/documents.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/health.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/index.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/task.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/version.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/models/webhook.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/plugins.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/py.typed +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/meilisearch_python_sdk/types.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/mkdocs.yaml +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/__init__.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_async_documents.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_async_index_plugins.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_async_search.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_decorators.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_documents.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_errors.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_http_requests.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_index_plugins.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_search.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_settings_models.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_utils.py +0 -0
- {meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/tests/test_version.py +0 -0
{meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/docs_publish.yml
RENAMED
|
@@ -16,11 +16,11 @@ jobs:
|
|
|
16
16
|
steps:
|
|
17
17
|
- uses: actions/checkout@v7
|
|
18
18
|
- name: Install uv
|
|
19
|
-
uses: astral-sh/setup-uv@
|
|
19
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
20
20
|
with:
|
|
21
21
|
enable-cache: true
|
|
22
22
|
- name: Set up Python
|
|
23
|
-
uses: actions/setup-python@
|
|
23
|
+
uses: actions/setup-python@v7
|
|
24
24
|
with:
|
|
25
25
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
26
26
|
- name: Install Dependencies
|
{meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/nightly_testing.yml
RENAMED
|
@@ -14,13 +14,13 @@ jobs:
|
|
|
14
14
|
steps:
|
|
15
15
|
- uses: actions/checkout@v7
|
|
16
16
|
- name: Install uv
|
|
17
|
-
uses: astral-sh/setup-uv@
|
|
17
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
18
18
|
with:
|
|
19
19
|
enable-cache: true
|
|
20
20
|
- name: install Just
|
|
21
21
|
uses: taiki-e/install-action@just
|
|
22
22
|
- name: Set up Python
|
|
23
|
-
uses: actions/setup-python@
|
|
23
|
+
uses: actions/setup-python@v7
|
|
24
24
|
with:
|
|
25
25
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
26
26
|
- name: Install Dependencies
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Prek Auto Update
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 2 * * *"
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
jobs:
|
|
11
|
+
update:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v7
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
17
|
+
with:
|
|
18
|
+
enable-cache: true
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v7
|
|
21
|
+
with:
|
|
22
|
+
python-version: 3.14
|
|
23
|
+
- name: Run Update
|
|
24
|
+
run: uv run prek autoupdate
|
|
25
|
+
- name: Create Pull Request
|
|
26
|
+
uses: peter-evans/create-pull-request@v8
|
|
27
|
+
with:
|
|
28
|
+
token: ${{ secrets.PREK_UPDATE_TOKEN }}
|
|
29
|
+
commit-message: "Bump prek hooks"
|
|
30
|
+
branch: prek-autoupdate
|
|
31
|
+
delete-branch: true
|
|
32
|
+
title: "Bump prek hooks"
|
|
33
|
+
body: "Automated update of prek hooks via `prek autoupdate`."
|
|
34
|
+
labels: |
|
|
35
|
+
dependencies
|
|
36
|
+
skip-changelog
|
{meilisearch_python_sdk-7.2.3 → meilisearch_python_sdk-7.4.0}/.github/workflows/pypi_publish.yml
RENAMED
|
@@ -14,11 +14,11 @@ jobs:
|
|
|
14
14
|
steps:
|
|
15
15
|
- uses: actions/checkout@v7
|
|
16
16
|
- name: Install uv
|
|
17
|
-
uses: astral-sh/setup-uv@
|
|
17
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
18
18
|
with:
|
|
19
19
|
enable-cache: true
|
|
20
20
|
- name: Set up Python
|
|
21
|
-
uses: actions/setup-python@
|
|
21
|
+
uses: actions/setup-python@v7
|
|
22
22
|
with:
|
|
23
23
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
24
24
|
- name: Install Dependencies
|
|
@@ -15,11 +15,11 @@ jobs:
|
|
|
15
15
|
- name: install Just
|
|
16
16
|
uses: taiki-e/install-action@just
|
|
17
17
|
- name: Install uv
|
|
18
|
-
uses: astral-sh/setup-uv@
|
|
18
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
19
19
|
with:
|
|
20
20
|
enable-cache: true
|
|
21
21
|
- name: Set up Python
|
|
22
|
-
uses: actions/setup-python@
|
|
22
|
+
uses: actions/setup-python@v7
|
|
23
23
|
with:
|
|
24
24
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
25
25
|
allow-prereleases: true
|
|
@@ -27,7 +27,13 @@ jobs:
|
|
|
27
27
|
run: just install
|
|
28
28
|
- name: pyrefly check
|
|
29
29
|
run: just pyrefly
|
|
30
|
-
|
|
30
|
+
prek:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v7
|
|
34
|
+
- uses: j178/prek-action@v2
|
|
35
|
+
env:
|
|
36
|
+
PREK_SKIP: no-commit-to-branch,pyrefly-check
|
|
31
37
|
parallel-testing:
|
|
32
38
|
strategy:
|
|
33
39
|
fail-fast: false
|
|
@@ -39,11 +45,11 @@ jobs:
|
|
|
39
45
|
- name: install Just
|
|
40
46
|
uses: taiki-e/install-action@just
|
|
41
47
|
- name: Install uv
|
|
42
|
-
uses: astral-sh/setup-uv@
|
|
48
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
43
49
|
with:
|
|
44
50
|
enable-cache: true
|
|
45
51
|
- name: Set up Python ${{ matrix.python-version }}
|
|
46
|
-
uses: actions/setup-python@
|
|
52
|
+
uses: actions/setup-python@v7
|
|
47
53
|
with:
|
|
48
54
|
python-version: ${{ matrix.python-version }}
|
|
49
55
|
allow-prereleases: true
|
|
@@ -57,7 +63,6 @@ jobs:
|
|
|
57
63
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
58
64
|
with:
|
|
59
65
|
fail_ci_if_error: true
|
|
60
|
-
|
|
61
66
|
parallel-testing-http2:
|
|
62
67
|
strategy:
|
|
63
68
|
fail-fast: false
|
|
@@ -69,11 +74,11 @@ jobs:
|
|
|
69
74
|
- name: install Just
|
|
70
75
|
uses: taiki-e/install-action@just
|
|
71
76
|
- name: Install uv
|
|
72
|
-
uses: astral-sh/setup-uv@
|
|
77
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
73
78
|
with:
|
|
74
79
|
enable-cache: true
|
|
75
80
|
- name: Set up Python ${{ matrix.python-version }}
|
|
76
|
-
uses: actions/setup-python@
|
|
81
|
+
uses: actions/setup-python@v7
|
|
77
82
|
with:
|
|
78
83
|
python-version: ${{ matrix.python-version }}
|
|
79
84
|
allow-prereleases: true
|
|
@@ -98,7 +103,6 @@ jobs:
|
|
|
98
103
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
99
104
|
with:
|
|
100
105
|
fail_ci_if_error: true
|
|
101
|
-
|
|
102
106
|
no-parallel-testing:
|
|
103
107
|
strategy:
|
|
104
108
|
fail-fast: false
|
|
@@ -110,11 +114,11 @@ jobs:
|
|
|
110
114
|
- name: install Just
|
|
111
115
|
uses: taiki-e/install-action@just
|
|
112
116
|
- name: Install uv
|
|
113
|
-
uses: astral-sh/setup-uv@
|
|
117
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
114
118
|
with:
|
|
115
119
|
enable-cache: true
|
|
116
120
|
- name: Set up Python ${{ matrix.python-version }}
|
|
117
|
-
uses: actions/setup-python@
|
|
121
|
+
uses: actions/setup-python@v7
|
|
118
122
|
with:
|
|
119
123
|
python-version: ${{ matrix.python-version }}
|
|
120
124
|
allow-prereleases: true
|
|
@@ -128,7 +132,6 @@ jobs:
|
|
|
128
132
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
129
133
|
with:
|
|
130
134
|
fail_ci_if_error: true
|
|
131
|
-
|
|
132
135
|
no-parallel-testing-http2:
|
|
133
136
|
strategy:
|
|
134
137
|
fail-fast: false
|
|
@@ -140,11 +143,11 @@ jobs:
|
|
|
140
143
|
- name: install Just
|
|
141
144
|
uses: taiki-e/install-action@just
|
|
142
145
|
- name: Install uv
|
|
143
|
-
uses: astral-sh/setup-uv@
|
|
146
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
144
147
|
with:
|
|
145
148
|
enable-cache: true
|
|
146
149
|
- name: Set up Python ${{ matrix.python-version }}
|
|
147
|
-
uses: actions/setup-python@
|
|
150
|
+
uses: actions/setup-python@v7
|
|
148
151
|
with:
|
|
149
152
|
python-version: ${{ matrix.python-version }}
|
|
150
153
|
allow-prereleases: true
|
|
@@ -180,14 +183,13 @@ jobs:
|
|
|
180
183
|
- name: install Just
|
|
181
184
|
uses: taiki-e/install-action@just
|
|
182
185
|
- name: Set up Python ${{ matrix.python-version }}
|
|
183
|
-
uses: actions/setup-python@
|
|
186
|
+
uses: actions/setup-python@v7
|
|
184
187
|
with:
|
|
185
188
|
python-version: ${{ matrix.python-version }}
|
|
186
189
|
allow-prereleases: true
|
|
187
190
|
cache: pip
|
|
188
191
|
- name: Test with pytest
|
|
189
192
|
run: just test-examples-ci
|
|
190
|
-
|
|
191
193
|
docs:
|
|
192
194
|
runs-on: ubuntu-latest
|
|
193
195
|
steps:
|
|
@@ -195,11 +197,11 @@ jobs:
|
|
|
195
197
|
- name: install Just
|
|
196
198
|
uses: taiki-e/install-action@just
|
|
197
199
|
- name: Install uv
|
|
198
|
-
uses: astral-sh/setup-uv@
|
|
200
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
199
201
|
with:
|
|
200
202
|
enable-cache: true
|
|
201
203
|
- name: Set up Python
|
|
202
|
-
uses: actions/setup-python@
|
|
204
|
+
uses: actions/setup-python@v7
|
|
203
205
|
with:
|
|
204
206
|
python-version: "3.14"
|
|
205
207
|
- name: Install Dependencies
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meilisearch-python-sdk
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.4.0
|
|
4
4
|
Summary: A Python client providing both async and sync support for the Meilisearch API
|
|
5
5
|
Project-URL: repository, https://github.com/sanders41/meilisearch-python-sdk
|
|
6
6
|
Project-URL: homepage, https://github.com/sanders41/meilisearch-python-sdk
|
|
@@ -53,7 +53,6 @@ Description-Content-Type: text/markdown
|
|
|
53
53
|
# Meilisearch Python SDK
|
|
54
54
|
|
|
55
55
|
[](https://github.com/sanders41/meilisearch-python-sdk/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
|
|
56
|
-
[](https://results.pre-commit.ci/latest/github/sanders41/meilisearch-python-sdk/main)
|
|
57
56
|
[](https://codecov.io/gh/sanders41/meilisearch-python-sdk)
|
|
58
57
|
[](https://badge.fury.io/py/meilisearch-python-sdk)
|
|
59
58
|
[](https://github.com/sanders41/meilisearch-python-sdk)
|
|
@@ -77,6 +76,12 @@ environment is created and activated, install the package with:
|
|
|
77
76
|
pip install meilisearch-python-sdk
|
|
78
77
|
```
|
|
79
78
|
|
|
79
|
+
Installing with the orjson extra will make JSON serilization/deserilization faster.
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
pip install meilisearch-python-sdk[orjson]
|
|
83
|
+
```
|
|
84
|
+
|
|
80
85
|
## Run Meilisearch
|
|
81
86
|
|
|
82
87
|
There are several ways to
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Meilisearch Python SDK
|
|
2
2
|
|
|
3
3
|
[](https://github.com/sanders41/meilisearch-python-sdk/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
|
|
4
|
-
[](https://results.pre-commit.ci/latest/github/sanders41/meilisearch-python-sdk/main)
|
|
5
4
|
[](https://codecov.io/gh/sanders41/meilisearch-python-sdk)
|
|
6
5
|
[](https://badge.fury.io/py/meilisearch-python-sdk)
|
|
7
6
|
[](https://github.com/sanders41/meilisearch-python-sdk)
|
|
@@ -25,6 +24,12 @@ environment is created and activated, install the package with:
|
|
|
25
24
|
pip install meilisearch-python-sdk
|
|
26
25
|
```
|
|
27
26
|
|
|
27
|
+
Installing with the orjson extra will make JSON serilization/deserilization faster.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
pip install meilisearch-python-sdk[orjson]
|
|
31
|
+
```
|
|
32
|
+
|
|
28
33
|
## Run Meilisearch
|
|
29
34
|
|
|
30
35
|
There are several ways to
|
|
@@ -13,3 +13,18 @@ If the code base you are working with uses asyncio, for example if you are using
|
|
|
13
13
|
The functionality of the two clients is the same, the difference being the `AsyncClient` provides
|
|
14
14
|
async methods and uses the `AsyncIndex`, which also provides async methods, while the `Client`
|
|
15
15
|
provides blocking methods and uses the `Index`, which also provides blocking methods.
|
|
16
|
+
|
|
17
|
+
## Instillation
|
|
18
|
+
|
|
19
|
+
Using a virtual environment is recommended for installing this package. Once the virtual
|
|
20
|
+
environment is created and activated, install the package with:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
pip install meilisearch-python-sdk
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Installing with the orjson extra will make JSON serilization/deserilization faster.
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
pip install meilisearch-python-sdk[orjson]
|
|
30
|
+
```
|
|
@@ -87,7 +87,7 @@ class AsyncClient(BaseClient):
|
|
|
87
87
|
json_handler: The module to use for json operations. The options are BuiltinHandler
|
|
88
88
|
(uses the json module from the standard library), or OrjsonHandler (uses orjson).
|
|
89
89
|
Note that in order use orjson the corresponding extra needs to be included.
|
|
90
|
-
Default: BuiltinHandler.
|
|
90
|
+
Default: OrjsonHandler if orjson is installed or BuiltinHandler if not.
|
|
91
91
|
http2: Whether or not to use HTTP/2. Defaults to False.
|
|
92
92
|
"""
|
|
93
93
|
super().__init__(api_key, custom_headers, json_handler)
|
|
@@ -11,6 +11,11 @@ from meilisearch_python_sdk.models.client import (
|
|
|
11
11
|
)
|
|
12
12
|
from meilisearch_python_sdk.types import JsonDict
|
|
13
13
|
|
|
14
|
+
try:
|
|
15
|
+
import orjson
|
|
16
|
+
except ImportError: # pragma: no cover
|
|
17
|
+
orjson = None # type: ignore
|
|
18
|
+
|
|
14
19
|
if TYPE_CHECKING:
|
|
15
20
|
from meilisearch_python_sdk.types import JsonMapping
|
|
16
21
|
|
|
@@ -22,7 +27,13 @@ class BaseClient:
|
|
|
22
27
|
custom_headers: dict[str, str] | None = None,
|
|
23
28
|
json_handler: BuiltinHandler | OrjsonHandler | None = None,
|
|
24
29
|
) -> None:
|
|
25
|
-
|
|
30
|
+
if json_handler is not None:
|
|
31
|
+
self.json_handler = json_handler
|
|
32
|
+
elif orjson is not None:
|
|
33
|
+
self.json_handler = OrjsonHandler()
|
|
34
|
+
else:
|
|
35
|
+
self.json_handler = BuiltinHandler()
|
|
36
|
+
|
|
26
37
|
self._headers: dict[str, str] | None = None
|
|
27
38
|
if api_key:
|
|
28
39
|
self._headers = {"Authorization": f"Bearer {api_key}"}
|
|
@@ -88,7 +88,7 @@ class Client(BaseClient):
|
|
|
88
88
|
json_handler: The module to use for json operations. The options are BuiltinHandler
|
|
89
89
|
(uses the json module from the standard library), or OrjsonHandler (uses orjson).
|
|
90
90
|
Note that in order use orjson the corresponding extra needs to be included.
|
|
91
|
-
Default: BuiltinHandler.
|
|
91
|
+
Default: OrjsonHandler if orjson is installed or BuiltinHandler if not.
|
|
92
92
|
http2: If set to True, the client will use HTTP/2. Defaults to False.
|
|
93
93
|
"""
|
|
94
94
|
super().__init__(api_key, custom_headers, json_handler)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "7.4.0"
|
|
@@ -11,7 +11,7 @@ from pydantic import TypeAdapter
|
|
|
11
11
|
|
|
12
12
|
from meilisearch_python_sdk.errors import MeilisearchError
|
|
13
13
|
from meilisearch_python_sdk.json_handler import BuiltinHandler, OrjsonHandler
|
|
14
|
-
from meilisearch_python_sdk.models.search import Hybrid
|
|
14
|
+
from meilisearch_python_sdk.models.search import Hybrid, Personalize
|
|
15
15
|
from meilisearch_python_sdk.models.settings import (
|
|
16
16
|
CompositeEmbedder,
|
|
17
17
|
Embedders,
|
|
@@ -153,6 +153,7 @@ def process_search_parameters(
|
|
|
153
153
|
exhaustive_facet_count: bool | None = None,
|
|
154
154
|
media: JsonMapping | None = None,
|
|
155
155
|
show_performance_details: bool = False,
|
|
156
|
+
personalize: Personalize | None = None,
|
|
156
157
|
) -> JsonDict:
|
|
157
158
|
if attributes_to_retrieve is None:
|
|
158
159
|
attributes_to_retrieve = ["*"]
|
|
@@ -213,6 +214,11 @@ def process_search_parameters(
|
|
|
213
214
|
if show_performance_details:
|
|
214
215
|
body["showPerformanceDetails"] = True
|
|
215
216
|
|
|
217
|
+
# no cover becuse personlized search requires an api key and any mocked test here would be
|
|
218
|
+
# pointless
|
|
219
|
+
if personalize is not None: # pragma: no cover
|
|
220
|
+
body["personalize"] = personalize.model_dump(by_alias=True)
|
|
221
|
+
|
|
216
222
|
return body
|
|
217
223
|
|
|
218
224
|
|
|
@@ -36,6 +36,7 @@ from meilisearch_python_sdk.models.index import Field, FieldResults, FieldsFilte
|
|
|
36
36
|
from meilisearch_python_sdk.models.search import (
|
|
37
37
|
FacetSearchResults,
|
|
38
38
|
Hybrid,
|
|
39
|
+
Personalize,
|
|
39
40
|
SearchResults,
|
|
40
41
|
SimilarSearchResults,
|
|
41
42
|
)
|
|
@@ -44,6 +45,7 @@ from meilisearch_python_sdk.models.settings import (
|
|
|
44
45
|
Faceting,
|
|
45
46
|
FilterableAttributeFeatures,
|
|
46
47
|
FilterableAttributes,
|
|
48
|
+
ForeignKey,
|
|
47
49
|
LocalizedAttributes,
|
|
48
50
|
MeilisearchSettings,
|
|
49
51
|
Pagination,
|
|
@@ -593,6 +595,7 @@ class AsyncIndex(BaseIndex):
|
|
|
593
595
|
retrieve_vectors: bool | None = None,
|
|
594
596
|
media: JsonMapping | None = None,
|
|
595
597
|
show_performance_details: bool = False,
|
|
598
|
+
personalize: Personalize | None = None,
|
|
596
599
|
) -> SearchResults:
|
|
597
600
|
"""Search the index.
|
|
598
601
|
|
|
@@ -663,6 +666,7 @@ class AsyncIndex(BaseIndex):
|
|
|
663
666
|
without a major version bump so use with caution.
|
|
664
667
|
show_performance_details: When set to true, the search response contains a performance
|
|
665
668
|
trace. Default False.
|
|
669
|
+
personalize: Personalize the search results.
|
|
666
670
|
|
|
667
671
|
Returns:
|
|
668
672
|
Results of the search
|
|
@@ -709,6 +713,7 @@ class AsyncIndex(BaseIndex):
|
|
|
709
713
|
retrieve_vectors=retrieve_vectors,
|
|
710
714
|
media=media,
|
|
711
715
|
show_performance_details=show_performance_details,
|
|
716
|
+
personalize=personalize,
|
|
712
717
|
)
|
|
713
718
|
search_url = f"{self._base_url_with_uid}/search"
|
|
714
719
|
|
|
@@ -739,6 +744,7 @@ class AsyncIndex(BaseIndex):
|
|
|
739
744
|
show_ranking_score_details=show_ranking_score_details,
|
|
740
745
|
vector=vector,
|
|
741
746
|
hybrid=hybrid,
|
|
747
|
+
personalize=personalize,
|
|
742
748
|
)
|
|
743
749
|
|
|
744
750
|
if self._concurrent_search_plugins:
|
|
@@ -771,6 +777,7 @@ class AsyncIndex(BaseIndex):
|
|
|
771
777
|
show_ranking_score=show_ranking_score,
|
|
772
778
|
show_ranking_score_details=show_ranking_score_details,
|
|
773
779
|
vector=vector,
|
|
780
|
+
personalize=personalize,
|
|
774
781
|
)
|
|
775
782
|
)
|
|
776
783
|
|
|
@@ -815,6 +822,7 @@ class AsyncIndex(BaseIndex):
|
|
|
815
822
|
show_ranking_score=show_ranking_score,
|
|
816
823
|
show_ranking_score_details=show_ranking_score_details,
|
|
817
824
|
vector=vector,
|
|
825
|
+
personalize=personalize,
|
|
818
826
|
)
|
|
819
827
|
)
|
|
820
828
|
|
|
@@ -872,6 +880,7 @@ class AsyncIndex(BaseIndex):
|
|
|
872
880
|
vector: list[float] | None = None,
|
|
873
881
|
locales: list[str] | None = None,
|
|
874
882
|
retrieve_vectors: bool | None = None,
|
|
883
|
+
personalize: Personalize | None = None,
|
|
875
884
|
exhaustive_facet_count: bool | None = None,
|
|
876
885
|
) -> FacetSearchResults:
|
|
877
886
|
"""Search the index.
|
|
@@ -926,6 +935,7 @@ class AsyncIndex(BaseIndex):
|
|
|
926
935
|
locales: Specifies the languages for the search. This parameter can only be used with
|
|
927
936
|
Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
|
|
928
937
|
retrieve_vectors: Return document vector data with search result.
|
|
938
|
+
personalize: Personalize the search results.
|
|
929
939
|
exhaustive_facet_count: forcing the facet search to compute the facet counts the same
|
|
930
940
|
way as the paginated search. This parameter can only be used with Milisearch >=
|
|
931
941
|
v1.14.0. Defaults to None.
|
|
@@ -977,6 +987,7 @@ class AsyncIndex(BaseIndex):
|
|
|
977
987
|
vector=vector,
|
|
978
988
|
locales=locales,
|
|
979
989
|
retrieve_vectors=retrieve_vectors,
|
|
990
|
+
personalize=personalize,
|
|
980
991
|
exhaustive_facet_count=exhaustive_facet_count,
|
|
981
992
|
)
|
|
982
993
|
search_url = f"{self._base_url_with_uid}/facet-search"
|
|
@@ -1008,6 +1019,7 @@ class AsyncIndex(BaseIndex):
|
|
|
1008
1019
|
ranking_score_threshold=ranking_score_threshold,
|
|
1009
1020
|
vector=vector,
|
|
1010
1021
|
exhaustive_facet_count=exhaustive_facet_count,
|
|
1022
|
+
personalize=personalize,
|
|
1011
1023
|
)
|
|
1012
1024
|
|
|
1013
1025
|
if self._concurrent_facet_search_plugins:
|
|
@@ -1041,6 +1053,7 @@ class AsyncIndex(BaseIndex):
|
|
|
1041
1053
|
ranking_score_threshold=ranking_score_threshold,
|
|
1042
1054
|
vector=vector,
|
|
1043
1055
|
exhaustive_facet_count=exhaustive_facet_count,
|
|
1056
|
+
personalize=personalize,
|
|
1044
1057
|
)
|
|
1045
1058
|
)
|
|
1046
1059
|
|
|
@@ -1085,6 +1098,7 @@ class AsyncIndex(BaseIndex):
|
|
|
1085
1098
|
ranking_score_threshold=ranking_score_threshold,
|
|
1086
1099
|
vector=vector,
|
|
1087
1100
|
exhaustive_facet_count=exhaustive_facet_count,
|
|
1101
|
+
personalize=personalize,
|
|
1088
1102
|
)
|
|
1089
1103
|
)
|
|
1090
1104
|
|
|
@@ -4665,6 +4679,81 @@ class AsyncIndex(BaseIndex):
|
|
|
4665
4679
|
|
|
4666
4680
|
return TaskInfo(**self._http_requests.parse_json(response))
|
|
4667
4681
|
|
|
4682
|
+
async def get_foreign_keys(self) -> list[ForeignKey]:
|
|
4683
|
+
"""Get foreign keys for the index.
|
|
4684
|
+
|
|
4685
|
+
Returns:
|
|
4686
|
+
A list of the foreign keys
|
|
4687
|
+
|
|
4688
|
+
Raises:
|
|
4689
|
+
MeilisearchCommunicationError: If there was an error communicating with the server.
|
|
4690
|
+
MeilisearchApiError: If the Meilisearch API returned an error.
|
|
4691
|
+
|
|
4692
|
+
Examples:
|
|
4693
|
+
>>> from meilisearch_async_client import AsyncClient
|
|
4694
|
+
>>> async with AsyncClient("http://localhost.com", "masterKey") as client:
|
|
4695
|
+
>>> index = await client.index("movies")
|
|
4696
|
+
>>> foreign_keys = await index.get_foreign_keys()
|
|
4697
|
+
"""
|
|
4698
|
+
response = await self._http_requests.get(f"{self._settings_url}/foreign-keys")
|
|
4699
|
+
foreign_keys = self._http_requests.parse_json(response)
|
|
4700
|
+
|
|
4701
|
+
return [ForeignKey(**foreign_key) for foreign_key in foreign_keys]
|
|
4702
|
+
|
|
4703
|
+
async def update_foreign_keys(
|
|
4704
|
+
self,
|
|
4705
|
+
foreign_keys: Sequence[ForeignKey],
|
|
4706
|
+
*,
|
|
4707
|
+
compress: bool = False,
|
|
4708
|
+
) -> TaskInfo:
|
|
4709
|
+
"""Update setting for foreign key.
|
|
4710
|
+
|
|
4711
|
+
Args:
|
|
4712
|
+
foreign_keys: List of foreign keys.
|
|
4713
|
+
compress: If set to True the data will be sent in gzip format. Defaults to False.
|
|
4714
|
+
|
|
4715
|
+
Returns:
|
|
4716
|
+
The details of the task status.
|
|
4717
|
+
|
|
4718
|
+
Raises:
|
|
4719
|
+
MeilisearchCommunicationError: If there was an error communicating with the server.
|
|
4720
|
+
MeilisearchApiError: If the Meilisearch API returned an error.
|
|
4721
|
+
|
|
4722
|
+
Examples:
|
|
4723
|
+
>>> from meilisearch_python_sdk import AsyncClient
|
|
4724
|
+
>>> from meilisearch_python_sdk.models.settings import ForeignKey
|
|
4725
|
+
>>> async with AsyncClient("http://localhost.com", "masterKey") as client:
|
|
4726
|
+
>>> index = await client.index("movies")
|
|
4727
|
+
>>> await index.update_foreign_keys([ForeignKey(foreign_index_uid="title", field_name="title")])
|
|
4728
|
+
"""
|
|
4729
|
+
response = await self._http_requests.put(
|
|
4730
|
+
f"{self._settings_url}/foreign-keys",
|
|
4731
|
+
[foreign_key.model_dump(by_alias=True) for foreign_key in foreign_keys],
|
|
4732
|
+
compress=compress,
|
|
4733
|
+
)
|
|
4734
|
+
|
|
4735
|
+
return TaskInfo(**self._http_requests.parse_json(response))
|
|
4736
|
+
|
|
4737
|
+
async def reset_foreign_keys(self) -> TaskInfo:
|
|
4738
|
+
"""Reset the foreign keys setting.
|
|
4739
|
+
|
|
4740
|
+
Returns:
|
|
4741
|
+
The details of the task status.
|
|
4742
|
+
|
|
4743
|
+
Raises:
|
|
4744
|
+
MeilisearchCommunicationError: If there was an error communicating with the server.
|
|
4745
|
+
MeilisearchApiError: If the Meilisearch API returned an error.
|
|
4746
|
+
|
|
4747
|
+
Examples:
|
|
4748
|
+
>>> from meilisearch_async_client import AsyncClient
|
|
4749
|
+
>>> async with AsyncClient("http://localhost.com", "masterKey") as client:
|
|
4750
|
+
>>> index = await client.index("movies")
|
|
4751
|
+
>>> await index.reset_foreign_keys()
|
|
4752
|
+
"""
|
|
4753
|
+
response = await self._http_requests.delete(f"{self._settings_url}/foreign-keys")
|
|
4754
|
+
|
|
4755
|
+
return TaskInfo(**self._http_requests.parse_json(response))
|
|
4756
|
+
|
|
4668
4757
|
async def fields(
|
|
4669
4758
|
self, offset: int = 0, limit: int = 20, filter: FieldsFilter | None = None
|
|
4670
4759
|
) -> FieldResults:
|