meilisearch-python-sdk 4.10.1__tar.gz → 5.0.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.

Potentially problematic release.


This version of meilisearch-python-sdk might be problematic. Click here for more details.

Files changed (104) hide show
  1. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/workflows/docs_publish.yml +1 -1
  2. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/workflows/nightly_testing.yml +1 -1
  3. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/workflows/pypi_publish.yml +1 -1
  4. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/workflows/testing.yml +12 -8
  5. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.pre-commit-config.yaml +2 -2
  6. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/PKG-INFO +3 -4
  7. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/_client.py +237 -0
  8. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/_http_requests.py +2 -1
  9. meilisearch_python_sdk-5.0.0/meilisearch_python_sdk/_version.py +1 -0
  10. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/decorators.py +2 -1
  11. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/version.py +1 -2
  12. meilisearch_python_sdk-5.0.0/meilisearch_python_sdk/models/webhook.py +24 -0
  13. meilisearch_python_sdk-5.0.0/meilisearch_python_sdk/types.py +8 -0
  14. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/pyproject.toml +6 -8
  15. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/conftest.py +17 -5
  16. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_async_client.py +47 -1
  17. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_client.py +46 -0
  18. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/uv.lock +392 -487
  19. meilisearch_python_sdk-4.10.1/meilisearch_python_sdk/_version.py +0 -1
  20. meilisearch_python_sdk-4.10.1/meilisearch_python_sdk/types.py +0 -16
  21. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/FUNDING.yml +0 -0
  22. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/release-draft-template.yaml +0 -0
  23. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/renovate.json5 +0 -0
  24. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.github/workflows/release-drafter.yml +0 -0
  25. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/.gitignore +0 -0
  26. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/CONTRIBUTING.md +0 -0
  27. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/LICENSE +0 -0
  28. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/README.md +0 -0
  29. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/assets/add_in_batches.png +0 -0
  30. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/assets/searches.png +0 -0
  31. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/codecov.yml +0 -0
  32. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/datasets/small_movies.json +0 -0
  33. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docker-compose.https.yml +0 -0
  34. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docker-compose.yml +0 -0
  35. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/.nojekyll +0 -0
  36. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/CNAME +0 -0
  37. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/async_client_api.md +0 -0
  38. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/async_index_api.md +0 -0
  39. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/client_api.md +0 -0
  40. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/css/custom.css +0 -0
  41. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/decorators_api.md +0 -0
  42. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/index.md +0 -0
  43. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/index_api.md +0 -0
  44. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/js/umami.js +0 -0
  45. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/json_handler.md +0 -0
  46. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/overrides/partials/footer.html +0 -0
  47. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/plugins.md +0 -0
  48. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/docs/pydantic.md +0 -0
  49. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/.gitignore +0 -0
  50. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/README.md +0 -0
  51. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/__init__.py +0 -0
  52. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/add_documents_decorator.py +0 -0
  53. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/add_documents_in_batches.py +0 -0
  54. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/async_add_documents_decorator.py +0 -0
  55. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/async_add_documents_in_batches.py +0 -0
  56. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/async_documents_and_search_results.py +0 -0
  57. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/async_search_tracker.py +0 -0
  58. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/async_update_settings.py +0 -0
  59. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/documents_and_search_results.py +0 -0
  60. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/fastapi_example.py +0 -0
  61. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/orjson_example.py +0 -0
  62. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/pyproject.toml +0 -0
  63. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/requirements.txt +0 -0
  64. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/search_tracker.py +0 -0
  65. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/tests/__init__.py +0 -0
  66. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/tests/conftest.py +0 -0
  67. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/tests/test_async_examples.py +0 -0
  68. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/tests/test_examples.py +0 -0
  69. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/ujson_example.py +0 -0
  70. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/examples/update_settings.py +0 -0
  71. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/justfile +0 -0
  72. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/__init__.py +0 -0
  73. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/_batch.py +0 -0
  74. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/_task.py +0 -0
  75. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/_utils.py +0 -0
  76. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/errors.py +0 -0
  77. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/index.py +0 -0
  78. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/json_handler.py +0 -0
  79. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/__init__.py +0 -0
  80. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/batch.py +0 -0
  81. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/client.py +0 -0
  82. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/documents.py +0 -0
  83. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/health.py +0 -0
  84. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/index.py +0 -0
  85. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/search.py +0 -0
  86. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/settings.py +0 -0
  87. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/models/task.py +0 -0
  88. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/plugins.py +0 -0
  89. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/meilisearch_python_sdk/py.typed +0 -0
  90. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/mkdocs.yaml +0 -0
  91. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/__init__.py +0 -0
  92. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_async_documents.py +0 -0
  93. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_async_index.py +0 -0
  94. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_async_index_plugins.py +0 -0
  95. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_async_search.py +0 -0
  96. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_decorators.py +0 -0
  97. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_documents.py +0 -0
  98. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_errors.py +0 -0
  99. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_index.py +0 -0
  100. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_index_plugins.py +0 -0
  101. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_search.py +0 -0
  102. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_settings_models.py +0 -0
  103. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_utils.py +0 -0
  104. {meilisearch_python_sdk-4.10.1 → meilisearch_python_sdk-5.0.0}/tests/test_version.py +0 -0
@@ -5,7 +5,7 @@ on:
5
5
  - published
6
6
  workflow_dispatch:
7
7
  env:
8
- PYTHON_VERSION: "3.12"
8
+ PYTHON_VERSION: "3.13"
9
9
  jobs:
10
10
  deploy:
11
11
  runs-on: ubuntu-latest
@@ -5,7 +5,7 @@ on:
5
5
  # Set with UTC time
6
6
  - cron: "0 5 * * *"
7
7
  env:
8
- PYTHON_VERSION: "3.12"
8
+ PYTHON_VERSION: "3.13"
9
9
  jobs:
10
10
  random-test-order:
11
11
  strategy:
@@ -4,7 +4,7 @@ on:
4
4
  types:
5
5
  - published
6
6
  env:
7
- PYTHON_VERSION: "3.12"
7
+ PYTHON_VERSION: "3.13"
8
8
  jobs:
9
9
  deploy:
10
10
  runs-on: ubuntu-latest
@@ -6,7 +6,7 @@ on:
6
6
  - main
7
7
  pull_request:
8
8
  env:
9
- PYTHON_VERSION: "3.9"
9
+ PYTHON_VERSION: "3.10"
10
10
  jobs:
11
11
  linting:
12
12
  runs-on: ubuntu-latest
@@ -22,6 +22,7 @@ jobs:
22
22
  uses: actions/setup-python@v6
23
23
  with:
24
24
  python-version: ${{ env.PYTHON_VERSION }}
25
+ allow-prereleases: true
25
26
  - name: Install Dependencies
26
27
  run: just install
27
28
  - name: mypy check
@@ -31,7 +32,7 @@ jobs:
31
32
  strategy:
32
33
  fail-fast: false
33
34
  matrix:
34
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
35
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
35
36
  runs-on: ubuntu-latest
36
37
  steps:
37
38
  - uses: actions/checkout@v5
@@ -45,6 +46,7 @@ jobs:
45
46
  uses: actions/setup-python@v6
46
47
  with:
47
48
  python-version: ${{ matrix.python-version }}
49
+ allow-prereleases: true
48
50
  - name: Install Dependencies
49
51
  run: just install
50
52
  - name: Test with pytest
@@ -59,7 +61,7 @@ jobs:
59
61
  strategy:
60
62
  fail-fast: false
61
63
  matrix:
62
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
64
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
63
65
  runs-on: ubuntu-latest
64
66
  steps:
65
67
  - uses: actions/checkout@v5
@@ -73,10 +75,10 @@ jobs:
73
75
  uses: actions/setup-python@v6
74
76
  with:
75
77
  python-version: ${{ matrix.python-version }}
78
+ allow-prereleases: true
76
79
  - name: Install Dependencies
77
80
  run: just install
78
81
  - name: Install truststore
79
- if: ${{ ! startsWith(matrix.python-version, '3.9') }}
80
82
  run: uv pip install truststore
81
83
  - name: Install ssl requirements
82
84
  run: |
@@ -99,7 +101,7 @@ jobs:
99
101
  strategy:
100
102
  fail-fast: false
101
103
  matrix:
102
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
104
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
103
105
  runs-on: ubuntu-latest
104
106
  steps:
105
107
  - uses: actions/checkout@v5
@@ -113,6 +115,7 @@ jobs:
113
115
  uses: actions/setup-python@v6
114
116
  with:
115
117
  python-version: ${{ matrix.python-version }}
118
+ allow-prereleases: true
116
119
  - name: Install Dependencies
117
120
  run: just install
118
121
  - name: Test with pytest
@@ -127,7 +130,7 @@ jobs:
127
130
  strategy:
128
131
  fail-fast: false
129
132
  matrix:
130
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
133
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
131
134
  runs-on: ubuntu-latest
132
135
  steps:
133
136
  - uses: actions/checkout@v5
@@ -141,10 +144,10 @@ jobs:
141
144
  uses: actions/setup-python@v6
142
145
  with:
143
146
  python-version: ${{ matrix.python-version }}
147
+ allow-prereleases: true
144
148
  - name: Install Dependencies
145
149
  run: just install
146
150
  - name: Install truststore
147
- if: ${{ ! startsWith(matrix.python-version, '3.9') }}
148
151
  run: uv pip install truststore
149
152
  - name: Install ssl requirements
150
153
  run: |
@@ -166,7 +169,7 @@ jobs:
166
169
  strategy:
167
170
  fail-fast: false
168
171
  matrix:
169
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
172
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
170
173
  runs-on: ubuntu-latest
171
174
  steps:
172
175
  - uses: actions/checkout@v5
@@ -176,6 +179,7 @@ jobs:
176
179
  uses: actions/setup-python@v6
177
180
  with:
178
181
  python-version: ${{ matrix.python-version }}
182
+ allow-prereleases: true
179
183
  cache: pip
180
184
  - name: Test with pytest
181
185
  run: just test-examples-ci
@@ -9,12 +9,12 @@ repos:
9
9
  - id: end-of-file-fixer
10
10
  - id: trailing-whitespace
11
11
  - repo: https://github.com/pre-commit/mirrors-mypy
12
- rev: v1.18.1
12
+ rev: v1.18.2
13
13
  hooks:
14
14
  - id: mypy
15
15
  additional_dependencies: [pydantic, orjson, types-aiofiles, types-ujson]
16
16
  - repo: https://github.com/astral-sh/ruff-pre-commit
17
- rev: v0.13.0
17
+ rev: v0.13.3
18
18
  hooks:
19
19
  - id: ruff-check
20
20
  args: [--fix, --exit-non-zero-on-fix]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meilisearch-python-sdk
3
- Version: 4.10.1
3
+ Version: 5.0.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
@@ -33,16 +33,15 @@ Classifier: Development Status :: 5 - Production/Stable
33
33
  Classifier: Intended Audience :: Developers
34
34
  Classifier: License :: OSI Approved :: MIT License
35
35
  Classifier: Operating System :: OS Independent
36
- Classifier: Programming Language :: Python :: 3.9
37
36
  Classifier: Programming Language :: Python :: 3.10
38
37
  Classifier: Programming Language :: Python :: 3.11
39
38
  Classifier: Programming Language :: Python :: 3.12
40
39
  Classifier: Programming Language :: Python :: 3.13
40
+ Classifier: Programming Language :: Python :: 3.14
41
41
  Classifier: Typing :: Typed
42
- Requires-Python: >=3.9
42
+ Requires-Python: >=3.10
43
43
  Requires-Dist: aiofiles>=0.7
44
44
  Requires-Dist: camel-converter[pydantic]>=1.0.0
45
- Requires-Dist: eval-type-backport>=0.2.0; python_version < '3.10'
46
45
  Requires-Dist: httpx[http2]>=0.17
47
46
  Requires-Dist: pydantic>=2.0.0
48
47
  Requires-Dist: pyjwt>=2.3.0
@@ -36,6 +36,7 @@ from meilisearch_python_sdk.models.search import (
36
36
  from meilisearch_python_sdk.models.settings import MeilisearchSettings
37
37
  from meilisearch_python_sdk.models.task import TaskInfo, TaskResult, TaskStatus
38
38
  from meilisearch_python_sdk.models.version import Version
39
+ from meilisearch_python_sdk.models.webhook import Webhook, WebhookCreate, Webhooks, WebhookUpdate
39
40
  from meilisearch_python_sdk.plugins import AsyncIndexPlugins, IndexPlugins
40
41
  from meilisearch_python_sdk.types import JsonDict
41
42
 
@@ -252,6 +253,124 @@ class AsyncClient(BaseClient):
252
253
 
253
254
  return Network(**response.json())
254
255
 
256
+ async def get_webhooks(self) -> Webhooks:
257
+ """Get all webhooks.
258
+
259
+ Returns:
260
+ An instance of Webhooks containing all configured webhooks.
261
+
262
+ Raises:
263
+ MeilisearchCommunicationError: If there was an error communicating with the server.
264
+ MeilisearchApiError: If the Meilisearch API returned an error.
265
+
266
+ Examples:
267
+ >>> from meilisearch_python_sdk import AsyncClient
268
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
269
+ >>> webhooks = await client.get_webhooks()
270
+ """
271
+ response = await self._http_requests.get("webhooks")
272
+
273
+ return Webhooks(**response.json())
274
+
275
+ async def get_webhook(self, uuid: str) -> Webhook:
276
+ """Get a specific webhook by UUID.
277
+
278
+ Args:
279
+ uuid: The webhook's unique identifier.
280
+
281
+ Returns:
282
+ An instance of Webhook containing the webhook information.
283
+
284
+ Raises:
285
+ MeilisearchCommunicationError: If there was an error communicating with the server.
286
+ MeilisearchApiError: If the Meilisearch API returned an error.
287
+
288
+ Examples:
289
+ >>> from meilisearch_python_sdk import AsyncClient
290
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
291
+ >>> webhook = await client.get_webhook("abc-123")
292
+ """
293
+ response = await self._http_requests.get(f"webhooks/{uuid}")
294
+
295
+ return Webhook(**response.json())
296
+
297
+ async def create_webhook(self, webhook: WebhookCreate) -> Webhook:
298
+ """Create a new webhook.
299
+
300
+ Args:
301
+ webhook: The webhook configuration to create.
302
+
303
+ Returns:
304
+ The created webhook.
305
+
306
+ Raises:
307
+ MeilisearchCommunicationError: If there was an error communicating with the server.
308
+ MeilisearchApiError: If the Meilisearch API returned an error.
309
+
310
+ Examples:
311
+ >>> from meilisearch_python_sdk import AsyncClient
312
+ >>> from meilisearch_python_sdk.models.webhook import WebhookCreate
313
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
314
+ >>> webhook_config = WebhookCreate(
315
+ >>> url="https://example.com/webhook",
316
+ >>> headers={"Authorization": "Bearer token"}
317
+ >>> )
318
+ >>> webhook = await client.create_webhook(webhook_config)
319
+ """
320
+ response = await self._http_requests.post(
321
+ "webhooks", webhook.model_dump(by_alias=True, exclude_none=True)
322
+ )
323
+
324
+ return Webhook(**response.json())
325
+
326
+ async def update_webhook(self, *, uuid: str, webhook: WebhookUpdate) -> Webhook:
327
+ """Update an existing webhook.
328
+
329
+ Args:
330
+ uuid: The webhook's unique identifier.
331
+ webhook: The webhook configuration updates.
332
+
333
+ Returns:
334
+ The updated webhook.
335
+
336
+ Raises:
337
+ MeilisearchCommunicationError: If there was an error communicating with the server.
338
+ MeilisearchApiError: If the Meilisearch API returned an error.
339
+
340
+ Examples:
341
+ >>> from meilisearch_python_sdk import AsyncClient
342
+ >>> from meilisearch_python_sdk.models.webhook import WebhookUpdate
343
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
344
+ >>> webhook_update = WebhookUpdate(url="https://example.com/new-webhook")
345
+ >>> webhook = await client.update_webhook("abc-123", webhook_update)
346
+ """
347
+ response = await self._http_requests.patch(
348
+ f"webhooks/{uuid}", webhook.model_dump(by_alias=True, exclude_none=True)
349
+ )
350
+
351
+ return Webhook(**response.json())
352
+
353
+ async def delete_webhook(self, uuid: str) -> int:
354
+ """Delete a webhook.
355
+
356
+ Args:
357
+ uuid: The webhook's unique identifier.
358
+
359
+ Returns:
360
+ The Response status code. 204 signifies a successful delete.
361
+
362
+ Raises:
363
+ MeilisearchCommunicationError: If there was an error communicating with the server.
364
+ MeilisearchApiError: If the Meilisearch API returned an error.
365
+
366
+ Examples:
367
+ >>> from meilisearch_python_sdk import AsyncClient
368
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
369
+ >>> await client.delete_webhook("abc-123")
370
+ """
371
+ response = await self._http_requests.delete(f"webhooks/{uuid}")
372
+ return response.status_code
373
+
255
374
  async def create_dump(self) -> TaskInfo:
256
375
  """Trigger the creation of a Meilisearch dump.
257
376
 
@@ -1229,6 +1348,124 @@ class Client(BaseClient):
1229
1348
 
1230
1349
  return Network(**response.json())
1231
1350
 
1351
+ def get_webhooks(self) -> Webhooks:
1352
+ """Get all webhooks.
1353
+
1354
+ Returns:
1355
+ An instance of Webhooks containing all configured webhooks.
1356
+
1357
+ Raises:
1358
+ MeilisearchCommunicationError: If there was an error communicating with the server.
1359
+ MeilisearchApiError: If the Meilisearch API returned an error.
1360
+
1361
+ Examples:
1362
+ >>> from meilisearch_python_sdk import Client
1363
+ >>> client = Client("http://localhost.com", "masterKey")
1364
+ >>> webhooks = client.get_webhooks()
1365
+ """
1366
+ response = self._http_requests.get("webhooks")
1367
+
1368
+ return Webhooks(**response.json())
1369
+
1370
+ def get_webhook(self, uuid: str) -> Webhook:
1371
+ """Get a specific webhook by UUID.
1372
+
1373
+ Args:
1374
+ uuid: The webhook's unique identifier.
1375
+
1376
+ Returns:
1377
+ An instance of Webhook containing the webhook information.
1378
+
1379
+ Raises:
1380
+ MeilisearchCommunicationError: If there was an error communicating with the server.
1381
+ MeilisearchApiError: If the Meilisearch API returned an error.
1382
+
1383
+ Examples:
1384
+ >>> from meilisearch_python_sdk import Client
1385
+ >>> client = Client("http://localhost.com", "masterKey")
1386
+ >>> webhook = client.get_webhook("abc-123")
1387
+ """
1388
+ response = self._http_requests.get(f"webhooks/{uuid}")
1389
+
1390
+ return Webhook(**response.json())
1391
+
1392
+ def create_webhook(self, webhook: WebhookCreate) -> Webhook:
1393
+ """Create a new webhook.
1394
+
1395
+ Args:
1396
+ webhook: The webhook configuration to create.
1397
+
1398
+ Returns:
1399
+ The created webhook.
1400
+
1401
+ Raises:
1402
+ MeilisearchCommunicationError: If there was an error communicating with the server.
1403
+ MeilisearchApiError: If the Meilisearch API returned an error.
1404
+
1405
+ Examples:
1406
+ >>> from meilisearch_python_sdk import Client
1407
+ >>> from meilisearch_python_sdk.models.webhook import WebhookCreate
1408
+ >>> client = Client("http://localhost.com", "masterKey")
1409
+ >>> webhook_config = WebhookCreate(
1410
+ >>> url="https://example.com/webhook",
1411
+ >>> headers={"Authorization": "Bearer token"}
1412
+ >>> )
1413
+ >>> webhook = client.create_webhook(webhook_config)
1414
+ """
1415
+ response = self._http_requests.post(
1416
+ "webhooks", webhook.model_dump(by_alias=True, exclude_none=True)
1417
+ )
1418
+
1419
+ return Webhook(**response.json())
1420
+
1421
+ def update_webhook(self, *, uuid: str, webhook: WebhookUpdate) -> Webhook:
1422
+ """Update an existing webhook.
1423
+
1424
+ Args:
1425
+ uuid: The webhook's unique identifier.
1426
+ webhook: The webhook configuration updates.
1427
+
1428
+ Returns:
1429
+ The updated webhook.
1430
+
1431
+ Raises:
1432
+ MeilisearchCommunicationError: If there was an error communicating with the server.
1433
+ MeilisearchApiError: If the Meilisearch API returned an error.
1434
+
1435
+ Examples:
1436
+ >>> from meilisearch_python_sdk import Client
1437
+ >>> from meilisearch_python_sdk.models.webhook import WebhookUpdate
1438
+ >>> client = Client("http://localhost.com", "masterKey")
1439
+ >>> webhook_update = WebhookUpdate(url="https://example.com/new-webhook")
1440
+ >>> webhook = client.update_webhook("abc-123", webhook_update)
1441
+ """
1442
+ response = self._http_requests.patch(
1443
+ f"webhooks/{uuid}", webhook.model_dump(by_alias=True, exclude_none=True)
1444
+ )
1445
+
1446
+ return Webhook(**response.json())
1447
+
1448
+ def delete_webhook(self, uuid: str) -> int:
1449
+ """Delete a webhook.
1450
+
1451
+ Args:
1452
+ uuid: The webhook's unique identifier.
1453
+
1454
+ Returns:
1455
+ The Response status code. 204 signifies a successful delete.
1456
+
1457
+ Raises:
1458
+ MeilisearchCommunicationError: If there was an error communicating with the server.
1459
+ MeilisearchApiError: If the Meilisearch API returned an error.
1460
+
1461
+ Examples:
1462
+ >>> from meilisearch_python_sdk import Client
1463
+ >>> client = Client("http://localhost.com", "masterKey")
1464
+ >>> client.delete_webhook("abc-123")
1465
+ """
1466
+ response = self._http_requests.delete(f"webhooks/{uuid}")
1467
+ return response.status_code
1468
+
1232
1469
  def create_dump(self) -> TaskInfo:
1233
1470
  """Trigger the creation of a Meilisearch dump.
1234
1471
 
@@ -1,8 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import gzip
4
+ from collections.abc import Callable
4
5
  from functools import lru_cache
5
- from typing import Any, Callable
6
+ from typing import Any
6
7
 
7
8
  from httpx import (
8
9
  AsyncClient,
@@ -0,0 +1 @@
1
+ VERSION = "5.0.0"
@@ -1,8 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import asyncio
4
+ from collections.abc import Callable
4
5
  from functools import wraps
5
- from typing import Any, Callable, NamedTuple
6
+ from typing import Any, NamedTuple
6
7
 
7
8
  from meilisearch_python_sdk import AsyncClient, Client
8
9
  from meilisearch_python_sdk._utils import use_task_groups
@@ -1,10 +1,9 @@
1
1
  from datetime import datetime
2
- from typing import Union
3
2
 
4
3
  from camel_converter.pydantic_base import CamelBase
5
4
 
6
5
 
7
6
  class Version(CamelBase):
8
7
  commit_sha: str
9
- commit_date: Union[datetime, str]
8
+ commit_date: datetime | str
10
9
  pkg_version: str
@@ -0,0 +1,24 @@
1
+ from __future__ import annotations
2
+
3
+ from camel_converter.pydantic_base import CamelBase
4
+
5
+
6
+ class Webhook(CamelBase):
7
+ uuid: str
8
+ url: str
9
+ headers: dict[str, str] | None = None
10
+ is_editable: bool
11
+
12
+
13
+ class Webhooks(CamelBase):
14
+ results: list[Webhook]
15
+
16
+
17
+ class WebhookCreate(CamelBase):
18
+ url: str
19
+ headers: dict[str, str] | None = None
20
+
21
+
22
+ class WebhookUpdate(CamelBase):
23
+ url: str | None = None
24
+ headers: dict[str, str] | None = None
@@ -0,0 +1,8 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import MutableMapping
4
+ from typing import Any, TypeAlias
5
+
6
+ Filter: TypeAlias = str | list[str | list[str]]
7
+ JsonDict: TypeAlias = dict[str, Any]
8
+ JsonMapping: TypeAlias = MutableMapping[str, Any]
@@ -6,18 +6,18 @@ build-backend = "hatchling.build"
6
6
  name = "meilisearch-python-sdk"
7
7
  description = "A Python client providing both async and sync support for the Meilisearch API"
8
8
  authors = [ { name = "Paul Sanders", email = "paul@paulsanders.dev" } ]
9
- requires-python = ">=3.9"
9
+ requires-python = ">=3.10"
10
10
  license = { file = "LICENSE" }
11
11
  readme = "README.md"
12
12
  keywords = ["meilisearch", "async", "python", "client", "sdk"]
13
13
  classifiers=[
14
14
  "Development Status :: 5 - Production/Stable",
15
15
  "Intended Audience :: Developers",
16
- "Programming Language :: Python :: 3.9",
17
16
  "Programming Language :: Python :: 3.10",
18
17
  "Programming Language :: Python :: 3.11",
19
18
  "Programming Language :: Python :: 3.12",
20
19
  "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
21
  "License :: OSI Approved :: MIT License",
22
22
  "Operating System :: OS Independent",
23
23
  "Typing :: Typed",
@@ -26,8 +26,6 @@ dynamic = ["version"]
26
26
  dependencies = [
27
27
  "aiofiles>=0.7",
28
28
  "camel-converter[pydantic]>=1.0.0",
29
- # allows pydantic to use pipe instead of Union
30
- "eval-type-backport>=0.2.0; python_version < '3.10'",
31
29
  "httpx[http2]>=0.17",
32
30
  "pydantic>=2.0.0",
33
31
  "PyJWT>=2.3.0",
@@ -41,15 +39,15 @@ all = ["orjson", "ujson"]
41
39
  [dependency-groups]
42
40
  dev = [
43
41
  "mkdocs==1.6.1",
44
- "mkdocs-material==9.6.20",
45
- "mkdocstrings[python]==0.30.0",
42
+ "mkdocs-material==9.6.21",
43
+ "mkdocstrings[python]==0.30.1",
46
44
  "mypy[faster-cache]==1.18.2",
47
45
  "pre-commit==4.3.0",
48
46
  "pytest==8.4.2",
49
47
  "pytest-cov==7.0.0",
50
48
  "pytest-asyncio==1.2.0",
51
49
  "pytest-xdist==3.8.0",
52
- "ruff==0.13.1",
50
+ "ruff==0.13.3",
53
51
  "types-aiofiles==24.1.0.20250822",
54
52
  "typing-extensions==4.15.0",
55
53
  "types-ujson==5.10.0.20250822",
@@ -87,7 +85,7 @@ ignore_missing_imports = true
87
85
 
88
86
  [tool.ruff]
89
87
  line-length = 100
90
- target-version = "py39"
88
+ target-version = "py310"
91
89
  fix = true
92
90
 
93
91
  [tool.ruff.lint]
@@ -2,7 +2,6 @@ import asyncio
2
2
  import csv
3
3
  import json
4
4
  import ssl
5
- import sys
6
5
  from logging import warning
7
6
  from pathlib import Path
8
7
  from uuid import uuid4
@@ -18,6 +17,7 @@ from httpx import AsyncClient as HttpxAsyncClient
18
17
 
19
18
  from meilisearch_python_sdk import AsyncClient, Client
20
19
  from meilisearch_python_sdk._task import async_wait_for_task, wait_for_task
20
+ from meilisearch_python_sdk.errors import MeilisearchApiError
21
21
  from meilisearch_python_sdk.json_handler import OrjsonHandler, UjsonHandler
22
22
  from meilisearch_python_sdk.models.settings import (
23
23
  Embedders,
@@ -29,6 +29,7 @@ from meilisearch_python_sdk.models.settings import (
29
29
  TypoTolerance,
30
30
  UserProvidedEmbedder,
31
31
  )
32
+ from meilisearch_python_sdk.models.webhook import WebhookCreate
32
33
 
33
34
  MASTER_KEY = "masterKey"
34
35
 
@@ -53,10 +54,7 @@ def ssl_verify(http2_enabled):
53
54
  return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) if http2_enabled else True
54
55
  return True # recommended default
55
56
  else: # truststore isn't installed
56
- if sys.version_info >= (3, 10): # should be available in 3.10+
57
- warning("truststore not installed, your environment may be broken run uv sync")
58
- # without truststore we can't verify the ssl (and when http2 is enabled, verification must be disabled)
59
- return not http2_enabled
57
+ warning("truststore not installed, your environment may be broken run uv sync")
60
58
 
61
59
 
62
60
  @pytest.fixture(scope="session")
@@ -353,3 +351,17 @@ def new_settings_localized():
353
351
  LocalizedAttributes(locales=["ita"], attribute_patterns=["*_it"]),
354
352
  ],
355
353
  )
354
+
355
+
356
+ @pytest.fixture
357
+ def webhook(client):
358
+ webhook_config = WebhookCreate(url="https://example.com/webhook")
359
+ webhook = client.create_webhook(webhook_config)
360
+
361
+ yield webhook
362
+
363
+ try:
364
+ client.delete_webhook(webhook.uuid)
365
+ except MeilisearchApiError as e:
366
+ if "webhook_not_found" in str(e):
367
+ pass