You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-34Lines changed: 33 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,15 @@ Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create yo
58
58
>
59
59
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
60
60
61
-
The SDK can be installed with either *pip* or *uv* package managers.
61
+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
62
+
63
+
### uv
64
+
65
+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
66
+
67
+
```bash
68
+
uv add mistralai
69
+
```
62
70
63
71
### PIP
64
72
@@ -68,12 +76,12 @@ The SDK can be installed with either *pip* or *uv* package managers.
68
76
pip install mistralai
69
77
```
70
78
71
-
### UV
79
+
### Poetry
72
80
73
-
*UV* is an extremely fast Python package and project manager. You can use it to add the SDK to your project:
81
+
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
74
82
75
83
```bash
76
-
uv add mistralai
84
+
poetry add mistralai
77
85
```
78
86
79
87
### Shell and script usage with `uv`
@@ -89,7 +97,7 @@ It's also possible to write a standalone Python script without needing to set up
89
97
```python
90
98
#!/usr/bin/env -S uv run --script
91
99
# /// script
92
-
# requires-python = ">=3.10"
100
+
# requires-python = ">=3.9"
93
101
# dependencies = [
94
102
# "mistralai",
95
103
# ]
@@ -152,6 +160,7 @@ with Mistral(
152
160
</br>
153
161
154
162
The same SDK client can also be used to make asynchronous requests by importing asyncio.
163
+
155
164
```python
156
165
# Asynchronous Example
157
166
import asyncio
@@ -205,6 +214,7 @@ with Mistral(
205
214
</br>
206
215
207
216
The same SDK client can also be used to make asynchronous requests by importing asyncio.
217
+
208
218
```python
209
219
# Asynchronous Example
210
220
import asyncio
@@ -258,6 +268,7 @@ with Mistral(
258
268
</br>
259
269
260
270
The same SDK client can also be used to make asynchronous requests by importing asyncio.
271
+
261
272
```python
262
273
# Asynchronous Example
263
274
import asyncio
@@ -311,6 +322,7 @@ with Mistral(
311
322
</br>
312
323
313
324
The same SDK client can also be used to make asynchronous requests by importing asyncio.
325
+
314
326
```python
315
327
# Asynchronous Example
316
328
import asyncio
@@ -436,33 +448,24 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
*[list](docs/sdks/documents/README.md#list) - List documents in a given library.
505
508
*[upload](docs/sdks/documents/README.md#upload) - Upload a new document.
@@ -512,23 +515,23 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
512
515
*[extracted_text_signed_url](docs/sdks/documents/README.md#extracted_text_signed_url) - Retrieve the signed URL of text extracted from a given document.
513
516
*[reprocess](docs/sdks/documents/README.md#reprocess) - Reprocess a document.
0 commit comments