Haldwani Times
Haldwani Times
Technology

mistralai 3.11.0

mistralai 3.11.0
Photo / Illustration: Haldwani Times Editorial Desk

Skip to main content Switch to mobile version mistralai 3.11.0 Python Client SDK for the Mistral AI API.

pip install mistralai==3.11.0 Copy PIP instructions

Before you begin, you will need a Mistral AI API key.

Get your own Mistral API Key: https://docs.mistral.ai/#api-access

Set your Mistral API Key as an environment variable. You only need to do this once.

# set Mistral API Key (using zsh for example) $ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv # reload the environment (or just quit and open a new terminal) $ source ~/.zshenv Service-account token

Workloads with a mounted service-account token can set MISTRAL_SA_TOKEN_PATH instead. The file is re-read on every request, so rotation is picked up. Credentials resolve in this order:

an Authorization header passed per request via http_headers

Mistral(api_key=...), which also accepts a callable

the token at MISTRAL_SA_TOKEN_PATH

An unreadable or empty token file raises ServiceAccountTokenError.

Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on La Plateforme to get access and read the docs to learn how to use it.

Mistral Python Client API Key Setup

Providers' SDKs Example Usage

Available Resources and Operations

Server-sent event streaming

Telemetry & Observability

Development Contributions

The SDK can be installed with uv, pip, or poetry package managers.

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.

uv add mistralai PIP

PIP is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.

pip install mistralai Poetry

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.

poetry add mistralai Shell and script usage with uv

You can use this SDK in a Python shell with uv and the uvx command that comes with it like so:

uvx --from mistralai python It's also possible to write a standalone Python script without needing to set up a whole project like so:

#!/usr/bin/env -S uv run --script # /// script # requires-python = ">=3.10" # dependencies = [ # "mistralai", # ] # /// from mistralai.client import Mistral sdk = Mistral( # SDK arguments ) # Rest of script here... Once that is saved to a file, you can run it with uv run script.py where script.py can be replaced with the actual file name.

Agents extra dependencies

When using the agents related feature it is required to add the agents extra dependencies. This can be added when installing the package:

pip install "mistralai[agents]" Note: These features require Python 3.10+ (the SDK minimum).

Voice agents extra dependencies

Holding a live voice conversation with an agent requires the voice-agents extra:

pip install "mistralai[voice-agents]" See Voice Agents below, and voice-agent usage and migration.

Additional mistralai-* packages (e.g. mistralai-workflows) can be installed separately and are available under the mistralai namespace:

pip install mistralai-workflows SDK Example Usage

Create Chat Completions

This example shows how to create chat completions.

# Synchronous Example from mistralai.client import Mistral import os with Mistral( api_key=os.getenv("MISTRAL_API_KEY"), ) as mistral: res = mistral.chat.complete(model="mistral-large-latest", messages=[ { "role": "user", "content": "Who is the best French painter? Answer in one short sentence.", }, ], stream=False, response_format={ "type": "text", }) # Handle response print(res) The same SDK client can also be used to make asynchronous requests by importing asyncio.

# Asynchronous Example import asyncio from mistralai.client import Mistral import os async def main(): async with Mistral( api_key=os.getenv("MISTRAL_API_KEY"), ) as mistral: res = await mistral.chat.complete_async(model="mistral-large-latest", messages=[ { "role": "user", "content": "Who is the best French painter? Answer in one short sentence.", }, ], stream=False, response_format={ "type": "text", }) # Handle response print(res) asyncio.run(main()) Upload a file

This example shows how to upload a file.

This example shows how to create agents completions.

This example shows how to create embedding request.

You can run the examples in the examples/ directory using uv run.

Before you begin, ensure you have AZURE_ENDPOINT and an AZURE_API_KEY. To obtain these, you will need to deploy Mistral on Azure AI. See instructions for deploying Mistral on Azure AI here.

pip install mistralai Step 2: Example Usage

Here's a basic example to get you started. You can also run the example in the examples directory.

import os from mistralai.azure.client import MistralAzure # The SDK automatically injects api-version as a query parameter client = MistralAzure( api_key=os.environ["AZURE_API_KEY"], server_url=os.environ["AZURE_ENDPOINT"], api_version="2024-05-01-preview", # Optional, this is the default ) res = client.chat.complete( model=os.environ["AZURE_MODEL"], messages=[ { "role": "user", "content": "Hello there!", } ], ) print(res.choices[0].message.content) Google Cloud

Before you begin, you will need to create a Google Cloud project and enable the Mistral API. To do this, follow the instructions here.

To run this locally you will also need to ensure you are authenticated with Google Cloud. You can do this by running

gcloud auth application-default login Step 1: Install

pip install mistralai # For GCP authentication support (required): pip install "mistralai[gcp]" Step 2: Example Usage

The SDK automatically:

Detects credentials via google.auth.default()

Auto-refreshes tokens when they expire

Builds the Vertex AI URL from project_id and region

import os from mistralai.gcp.client import MistralGCP # The SDK auto-detects credentials and builds the Vertex AI URL client = MistralGCP( project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected from credentials region="us-central1", # Default: europe-west4 ) res = client.chat.complete( model="mistral-small-2503", messages=[ { "role": "user", "content": "Hello there!", } ], ) print(res.choices[0].message.content) Available Resources and Operations

complete - Agents Completion

stream - Stream Agents completion

list - List audio agents

create - Create an audio agent

get - Get an audio agent

update - Update an audio agent

delete - Delete an audio agent

list_versions - List audio agent versions

list_sessions - List audio agent sessions

create - Create an agent session

get - Get session status

update - Update a live agent session

close - Stop an agent session

Audio.Transcriptions

complete - Create Transcription

stream - Create Streaming Transcription (SSE)

list - List all voices ⚠️ Deprecated Use search instead.

create - Create a new voice

delete - Delete a custom voice

update - Update voice metadata

get - Get voice details

get_sample_audio - Get voice sample audio

search - List voices, cursor-paginated

list - Get Batch Jobs

create - Create Batch Job

delete - Delete Batch Job

cancel - Cancel Batch Job

create - Create a agent that can be used within a conversation.

list - List agent entities. ⚠️ Deprecated Use list_pages instead.

list_pages - List agent entities, cursor-paginated.

get - Retrieve an agent entity.

update - Update an agent entity.

delete - Delete an agent entity.

update_version - Update an agent version.

list_versions - List all versions of an agent.

get_version - Retrieve a specific version of an agent.

create_version_alias - Create or update an agent version alias.

list_version_aliases - List all aliases for an agent.

delete_version_alias - Delete an agent version alias.

get_budget - Get Budget

get_subscription - Get Subscription

create - Create a new connector.

list - List all connectors.

get_auth_url - Get the auth URL for a connector.

share - Share a private connector to the current workspace.

unshare - Unshare a connector from the current workspace.

share_to_organization - Share a connector to the current organization.

unshare_from_organization - Unshare a connector from the current organization.

activate_for_consumer - Activate a connector for the given consumer (organization, workspace, user).

deactivate_for_consumer - Deactivate a connector for the current consumer (at organization, workspace or user level).

call_tool - Call Connector Tool ⚠️ Deprecated

list_tools - List tools for a connector.

get_authentication_methods - Get authentication methods for a connector.

list_organization_credentials - List organization credentials for a connector.

list_workspace_credentials - List workspace credentials for a connector.

list_user_credentials - List user credentials for a connector.

delete_all_user_credentials - Delete all user credentials for a connector.

create_credentials - Create consumer credentials for a connector.

update_credentials - Create or update consumer credentials for a connector.

delete_credentials - Delete credentials for a consumer.

get - Get a connector.

update - Update a connector.

delete - Delete a connector.

Beta.Context.SearchIndexes

create - Create a managed index

list - List managed indexes

get - Get a managed index

update - Update a managed index schema

delete - Delete a managed index

ingest_documents - Ingest documents into a managed index

delete_documents - Delete documents from a managed index

search - Search a managed index

navigate - Navigate to adjacent chunks

read - Read chunks within a span

grep - Grep for a pattern within a source

get_chunk - Get a single chunk by id

get_index_summary - Get Managed Index Summary

generate_index_summary - Generate a summary field for a managed index

set_index_summary - Set Managed Index Summary

start - Create a conversation and append entries to it.

list - List all created conversations.

get - Retrieve a conversation information.

delete - Delete a conversation.

append - Append new entries to an existing conversation.

get_history - Retrieve all entries in a conversation.

get_messages - Retrieve all messages in a conversation.

restart - Restart a conversation starting from a given entry.

start_stream - Create a conversation and append entries to it.

append_stream - Append new entries to an existing conversation.

restart_stream - Restart a conversation starting from a given entry.

list - List all libraries you have access to.

create - Create a new Library.

get - Detailed information about a specific Library.

update - Update a library.

libraries_update_v1 - Update a library. ⚠️ Deprecated

Beta.Libraries.Accesses

list - List all of the access to this library.

update_or_create - Create or update an access level.

delete - Delete an access level.

Beta.Libraries.Documents

list - List documents in a given library.

Beta.Observability.Datasets

create - Create a new empty dataset

list - List existing datasets

fetch - Get dataset by ID or slug

delete - Delete a dataset

update - Patch dataset

list_records - List existing records in the dataset

create_record - Add a record to the dataset

create_records - Add several records to the dataset

import_from_file - Populate the dataset with records from an uploaded file

import_from_spans - Populate the dataset with records mapped from telemetry spans

import_from_dataset_records - Populate the dataset with records from another dataset

export_to_jsonl - Export to the Files API and retrieve presigned URL to download the resulting JSONL file

fetch_task - Get status of a dataset import task

list_tasks - List import tasks for the given dataset

Beta.Observability.Datasets.Records

fetch - Get the content of a given dataset record

delete - Delete a record from a dataset

bulk_delete - Delete multiple records from datasets

update_payload - Update a dataset record payload

update_properties - Update dataset record properties

Beta.Observability.Evaluations

create_pipeline - Create a pipeline

list_pipelines - List pipelines

get_pipeline - Get a pipeline

update_pipeline - Update a pipeline

delete_pipeline - Delete a pipeline

list - List evaluations for a project

get - Get evaluation by slug

Beta.Observability.Evaluations.Optimizations

list - List optimizations with optional filters

get - Get an optimization by id (with its anchored evaluation + project)

list_trials - List an optimization's trials with their observation runs (paginated)

Beta.Observability.Evaluations.Projects

list - List projects

get - Get project by slug

Beta.Observability.Evaluations.Records

get - Get a specific record from an evaluation run

search - Search records for an evaluation run with content filters

Beta.Observability.Evaluations.Runs

search - Search evaluation runs with filters

compare - Compare candidate runs against a baseline run of the same evaluation

search_all - Search evaluation runs across all evaluations

get - Get a specific evaluation run by ID

get_statistics - Get statistics for a specific evaluation run

compute_statistics - Compute statistics for a specific evaluation run with optional filters

Beta.Observability.Evaluations.Scorers

create - Create a scorer

get - Get a scorer by slug

update - Edit a scorer

Beta.Observability.Logs

search - Search logs

list - Get log field definitions

fetch_options - Get options for a log field

Beta.Observability.Spans

search_spans - Search spans

aggregate - Aggregate spans

aggregate_span_evaluations - Aggregate span evaluations

search_span_evaluations - Search span evaluations

search_latest_span_evaluations - Search latest span evaluations

search_pipeline_results - Search pipeline results

list_pipeline_result_fields - Get pipeline result field definitions

list_span_fields - Get span field definitions

list_span_eval_fields - Get span evaluation field definitions

fetch_span_field_options - Get options for a span field

fetch_span_eval_field_options - Get options for a span evaluation field

Beta.Observability.Traces

search - Search traces

aggregate - Aggregate traces

get_trace_fields - Get trace field definitions

get_trace_by_id - Get trace by id

get_trace_spans - Get trace spans

fetch_options - Get options for a trace field

get_span_by_id - Get span by id

create - CreatePrompt

delete - DeletePrompt

update_metadata - UpdatePrompt

list_versions - ListPromptVersions

create_version - CreatePromptVersion

get_version - GetPromptVersion

update_version_metadata - UpdatePromptVersionMetadata

Beta.Rag.IngestionPipelineConfigurations

list - List ingestion pipeline configurations

register - Register Config

update_run_info - Update Run Info

Beta.ServiceAccounts

create - Create Service Account

list - List Service Accounts

list_assignable_roles - List Assignable Service Account Roles

get - Get Service Account

update - Update Service Account

delete - Delete Service Account

set_roles - Set Service Account Roles

list_roles - List Service Account Roles

create - CreateSkill

delete - DeleteSkill

update_metadata - UpdateSkill

list_versions - ListSkillVersions

create_version - CreateSkillVersion

get_version - GetSkillVersion

update_version_metadata - UpdateSkillVersionMetadata

create - Create Trigger

list - List Triggers

delete - Delete Trigger

list_events - List Trigger Events

get_identity - Get Identity

list_organizations - List Organizations

list_workspaces - List Workspaces

list - List Webhooks

create - Create Webhook

delete - Delete Webhook

get_signing_secret - Get Webhook Signing Secret

complete - Chat Completion

stream - Stream chat completion

moderate - Moderations

moderate_chat - Chat Moderations

classify - Classifications

classify_chat - Chat Classifications

get_stream_events - Get Stream Events

get_workflow_events - Get Workflow Events

upload - Upload File

retrieve - Retrieve File

delete - Delete File

download - Download File

get_signed_url - Get Signed Url

complete - Fim Completion

stream - Stream fim completion

retrieve - Retrieve Model

delete - Delete Model

update - Update Fine Tuned Model

archive - Archive Fine Tuned Model

unarchive - Unarchive Fine Tuned Model

create - Create Client Session

create - Create Response

count_input_tokens - Count Input Tokens

detect_multipart - Detections

get_workflows - Get Workflows

get_workflow_registrations - Get Workflow Registrations

execute_workflow - Execute Workflow

execute_workflow_registration - Execute Workflow Registration ⚠️ Deprecated

get_workflow - Get Workflow

update_workflow - Update Workflow

get_workflow_registration - Get Workflow Registration

bulk_archive_workflows - Bulk Archive Workflows

bulk_unarchive_workflows - Bulk Unarchive Workflows

add_workflow_tags - Add Workflow Tags

archive_workflow - Archive Workflow

unarchive_workflow - Unarchive Workflow

Workflows.Deployments

unharden_deployment - Unharden Deployment

list_deployments - List Deployments

create_deployment - Create Deployment

update_deployment - Update Deployment

delete_deployment - Delete Deployment

get_deployment - Get Deployment

stop_deployment - Stop Deployment

start_deployment - Start Deployment

restart_deployment - Restart Deployment

list_deployment_workers - List Deployment Workers

get_deployment_archive - Get Deployment Archive

create_deployment_archive - Create Deployment Archive

get_deployment_logs - Get Deployment Logs

stream_deployment_logs - Stream Deployment Logs

Workflows.Executions

get_workflow_execution - Get Workflow Execution

get_workflow_execution_history - Get Workflow Execution History

signal_workflow_execution - Signal Workflow Execution

query_workflow_execution - Query Workflow Execution

terminate_workflow_execution - Terminate Workflow Execution

batch_terminate_workflow_executions - Batch Terminate Workflow Executions

cancel_workflow_execution - Cancel Workflow Execution

batch_cancel_workflow_executions - Batch Cancel Workflow Executions

reset_workflow - Reset Workflow

update_workflow_execution - Update Workflow Execution

get_workflow_execution_trace_info - Get Workflow Execution Trace Info

get_workflow_execution_trace_otel - Get Workflow Execution Trace Otel

get_workflow_execution_trace_summary - Get Workflow Execution Trace Summary

get_workflow_execution_trace_events - Get Workflow Execution Trace Events

get_workflow_execution_logs - Get Workflow Execution Logs

stream_workflow_execution_logs - Stream Workflow Execution Logs

get_workflow_metrics - Get Workflow Metrics

list_runs - List Runs

get_run_history - Get Run History

get_schedules - Get Schedules

schedule_workflow - Schedule Workflow

get_schedule - Get Schedule

unschedule_workflow - Unschedule Workflow

update_schedule - Update Schedule

pause_schedule - Pause Schedule

resume_schedule - Resume Schedule

trigger_schedule - Trigger Schedule

Server-sent events are used to stream content from certain operations. These operations will expose the stream as Generator that can be consumed using a simple for loop. The loop will terminate when the server no longer has any events to send and closes the underlying connection.

The stream is also a Context Manager and can be used with the with statement and will close the underlying connection when the context is exited.

from mistralai.client import Mistral import os with Mistral( api_key=os.getenv("MISTRAL_API_KEY"), ) as mistral: res = mistral.beta.conversations.start_stream(inputs=[ { "object": "entry", "type": "function.result", "tool_call_id": "", "result": "", }, ], completion_args={ "response_format": { "type": "text", }, }) with res as event_stream: for event in event_stream: # handle event print(event, flush=True) Json Streaming

Json Streaming (jsonl / x-ndjson) content type can be used to stream content from certain operations. These operations will expose the stream as Generator that can be consumed using a simple for loop. The loop will terminate when the server no longer has any events to send and closes the underlying connection.

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the returned response object will have a Next method that can be called to pull down the next group of results. If the return value of Next is None, then there are no more pages to be fetched.

Here's an example of one such pagination call:

Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.

To change the default retry strategy for a single API call, simply provide a RetryConfig object to the call:

MistralError is the base class for all HTTP error responses. It has the following properties:

MistralError: The base class for HTTP error responses.

httpx.RequestError: Base class for request errors. httpx.ConnectError: HTTP client was unable to make a request to a server.

httpx.TimeoutException: HTTP request timed out.

Inherit from MistralError:

HTTPValidationError: Validation Error. Status code 422. Applicable to 189 of 303 methods.*

ObservabilityError: Bad Request - Invalid request parameters or data. Applicable to 64 of 303 methods.*

ConnectorErrorResponse: Applicable to 4 of 303 methods.*

ResponseValidationError: Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the cause attribute.

* Check the method documentation to see if the error is applicable.

Select Server by Name

You can override the default server globally by passing a server name to the server: str optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:

The default server can also be overridden globally by passing a URL to the server_url: str optional parameter when initializing the SDK client instance. For example:

The Python SDK makes API calls using the httpx2 HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. Depending on whether you are using the sync or async version of the SDK, you can pass an instance of HttpClient or AsyncHttpClient respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of httpx.Client or httpx.AsyncClient directly.

For example, you could specify a header for every request that this sdk makes as follows:

This SDK is generated against httpx2, Pydantic's maintained fork of httpx. The fork keeps the same public API, so everything above applies unchanged - httpx2.Client and httpx2.AsyncClient are what the SDK expects.

Per-Client Security Schemes

This SDK supports the following security scheme globally:

To authenticate with the API the api_key parameter must be set when initializing the SDK client instance. For example:

Some operations in this SDK require the security scheme to be specified at the request level. For example:

The Mistral class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a context manager and reuse it across the application.

You can setup your SDK to emit debug logs for SDK requests and responses.

You can pass your own logger class directly into your SDK.

Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

PyCharm Pydantic Plugin

The SDK can emit OpenTelemetry traces for the API calls it makes (chat, agents, embeddings, OCR, …), following the GenAI semantic conventions. Spans capture the operation, model, token usage, and — unless redacted — the input/output messages and tool calls. Telemetry is opt-in and lives in the mistralai.extra.observability module.

Install the telemetry extra:

pip install "mistralai[telemetry]" # or: uv add "mistralai[telemetry]" Enabling telemetry

Either set an environment variable before creating the client:

export MISTRAL_SDK_TELEMETRY=dedicated # dedicated | global | false or configure it in code:

import os from mistralai.client import Mistral from mistralai.extra.observability import configure_telemetry with Mistral(api_key=os.environ["MISTRAL_API_KEY"]) as client: # Dedicated mode (default): the SDK creates and owns an OTLP exporter that # ships spans to the Mistral telemetry endpoint. Spans are redacted before # export. configure_telemetry(client) client.chat.complete( model="mistral-small-latest", messages=[{"role": "user", "content": "Hello!"}], ) In dedicated mode, traces go to /telemetry/v1/traces on the client's server_url if one is set, otherwise to https://api.mistral.ai, including for the named eu/us servers. The regional hosts do not serve that route, so use server="eu" rather than server_url="https://api.eu.mistral.ai". Set MISTRAL_OTLP_TRACES_ENDPOINT to send traces to a separate collector.

The exporter authenticates like API calls: an explicit api_key, then the token at MISTRAL_SA_TOKEN_PATH (re-read on every export, so rotation is picked up), then MISTRAL_API_KEY.

Telemetry never fails an API call. If telemetry enabled through MISTRAL_SDK_TELEMETRY cannot be set up, for example because no credential is available or the telemetry extra is not installed, the client logs one warning and keeps working without telemetry. An explicit configure_telemetry(client) call raises instead.

configure_telemetry(client, provider=...) selects where spans go and who owns the export pipeline:

In global/custom modes your application owns the pipeline, so the redaction argument is ignored (a warning is logged). Wrap your own exporter with RedactingSpanExporter to redact spans there:

from opentelemetry import trace from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter from mistralai.extra.observability import RedactingSpanExporter, configure_telemetry provider = TracerProvider() provider.add_span_processor( BatchSpanProcessor(RedactingSpanExporter(OTLPSpanExporter())) ) trace.set_tracer_provider(provider) # SDK spans now flow through your global provider (already redacted above). configure_telemetry(client, provider="global") Redaction

In dedicated mode, redaction is on by default. Control it with the redaction argument, which also accepts any of the reusable policies from mistralai.extra.observability:

from mistralai.extra.observability import AttributeRedactionPolicy configure_telemetry(client) # default policy (regex) configure_telemetry(client, redaction=AttributeRedactionPolicy()) # very conservative key-oriented policy configure_telemetry(client, redaction=False) # disabled - no redaction configure_telemetry( # custom callback to control how attributes are redacted client, redaction=lambda key, value: None if "email" in key else value, ) Policy Strategy Trade-off RegexRedactionPolicy (default, redaction=True) Content-oriented: keeps keys and structure, redacts matched substrings (secret tokens plus PII — emails, card-like sequences, IPv4). Redacts most sensitive data while preserving observability value; may miss free-form PII or secrets not in the pattern set. AttributeRedactionPolicy Key-oriented: redacts whole values for sensitive keys (explicit set, fragment match, or non-primitive value), then scans kept values for secret token patterns. Very conservative, but erases most prompt/response content. CallbackRedactionPolicy (redaction=) Your (key, value) -> value | None masker per attribute; return None to drop the attribute. Full control; you own the logic. The built-in defaults are exported as constants, so you can extend them instead of replacing them wholesale:

import re from mistralai.extra.observability import ( DEFAULT_PII_SECRET_PATTERNS, DEFAULT_SENSITIVE_ATTRIBUTE_KEYS, AttributeRedactionPolicy, RegexRedactionPolicy, ) # Content-oriented: add a custom secret pattern to the default set. configure_telemetry( client, redaction=RegexRedactionPolicy( patterns=(*DEFAULT_PII_SECRET_PATTERNS, re.compile(r"\bacme-[a-z0-9]{16}\b")), ), ) # Key-oriented: mask an extra application attribute on top of the defaults. configure_telemetry( client, redaction=AttributeRedactionPolicy( sensitive_keys=DEFAULT_SENSITIVE_ATTRIBUTE_KEYS | {"app.customer.email"}, ), ) Note: the RedactingSpanExporter primitive is reusable by any OpenTelemetry application, independent of the Mistral client.

Environment variables

Runnable examples live in examples/mistral/observability.

client.audio.sessions.init() opens a live, bidirectional voice session on top of the generated audio.sessions REST methods, which stay available for plain session CRUD. Install the extra; system audio also needs PortAudio (brew install portaudio on macOS).

Omit audio_interface to drive 48 kHz mono signed 16-bit PCM yourself: register an audio callback and call session.send_audio() after connect().

Tool declarations, saved agents and versions, event semantics and migration from the standalone mistralai-voice-agents package are covered in the voice agents guide. The runnable examples live in examples/audio/voice_agents.

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

Released: Dec 1, 2026

Both files in this release have provenance metadata.

View provenance details

agents gcp mcp realtime telemetry voice-agents workflow-payload-compression workflow-payload-encryption workflow-payload-offloading workflow-payload-offloading-azure workflow-payload-offloading-gcs workflow-payload-offloading-s3

Release files for mistralai 3.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Built distribution (wheel)

Total release size: 2.8 MB

Release files / mistralai-3.11.0.tar.gz

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Release files / mistralai-3.11.0-py3-none-any.whl

Security for mistralai 3.11.0

Both files in this release have been uploaded with provenance metadata.

With provenance mistralai-3.11.0.tar.gz Dec 1, 2026

With provenance mistralai-3.11.0-py3-none-any.whl Dec 1, 2026

Attestation for mistralai-3.11.0.tar.gz

Attestation for mistralai-3.11.0-py3-none-any.whl

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Dec 1, 2026 2 release files Full provenance

Nov 30, 2026 2 release files Full provenance

Nov 24, 2026 2 release files Full provenance

Nov 18, 2026 2 release files Full provenance

Nov 1, 2026 2 release files Full provenance

Oct 28, 2026 2 release files Full provenance

Oct 25, 2026 2 release files Full provenance

Oct 23, 2026 2 release files Full provenance

Oct 20, 2026 2 release files Full provenance

Oct 9, 2026 2 release files Full provenance

Oct 6, 2026 2 release files Full provenance

Sep 28, 2026 2 release files Full provenance

Sep 15, 2026 2 release files Full provenance

Sep 9, 2026 2 release files Full provenance

Aug 21, 2026 2 release files Full provenance

Aug 13, 2026 2 release files Full provenance

Aug 11, 2026 2 release files Full provenance

Aug 4, 2026 2 release files Full provenance

Jul 28, 2026 2 release files Full provenance

Jul 24, 2026 2 release files Full provenance

Jul 21, 2026 2 release files Full provenance

Jul 17, 2026 2 release files Full provenance

Jul 6, 2026 2 release files Full provenance

Jul 3, 2026 2 release files Full provenance

Jul 1, 2026 2 release files Full provenance

Jun 23, 2026 2 release files Full provenance

Jun 19, 2026 2 release files Full provenance

Jun 17, 2026 2 release files Full provenance

Jun 16, 2026 2 release files Full provenance

Jun 3, 2026 2 release files Full provenance

May 28, 2026 2 release files Full provenance

May 25, 2026 2 release files Full provenance

May 7, 2026 2 release files No provenance

Apr 30, 2026 2 release files No provenance

Apr 27, 2026 2 release files No provenance

Apr 23, 2026 2 release files No provenance

Apr 21, 2026 2 release files No provenance

Apr 16, 2026 2 release files No provenance

Apr 14, 2026 2 release files No provenance

Apr 10, 2026 2 release files No provenance

Apr 7, 2026 2 release files No provenance

Apr 3, 2026 2 release files No provenance

Mar 31, 2026 2 release files No provenance

Mar 30, 2026 2 release files No provenance

Mar 23, 2026 2 release files No provenance

Mar 20, 2026 2 release files No provenance

Yanked reason: This version included a broken import: ChatCompletionChoice missing from client.models exports

Mar 18, 2026 2 release files No provenance

Mar 16, 2026 2 release files No provenance

Mar 13, 2026 2 release files No provenance

Mar 12, 2026 2 release files No provenance

Mar 10, 2026 2 release files No provenance

Mar 2, 2026 2 release files No provenance

Feb 26, 2026 2 release files No provenance

Feb 20, 2026 2 release files No provenance

Feb 17, 2026 2 release files No provenance

Feb 13, 2026 2 release files No provenance

Feb 11, 2026 2 release files No provenance

Feb 4, 2026 2 release files No provenance

Jan 29, 2026 2 release files No provenance

Jan 16, 2026 2 release files No provenance

Dec 17, 2025 2 release files No provenance

Oct 2, 2025 2 release files No provenance

Sep 2, 2025 2 release files No provenance

Aug 26, 2025 2 release files No provenance

Aug 25, 2025 2 release files No provenance

Aug 20, 2025 2 release files No provenance

Aug 17, 2025 2 release files No provenance

Jul 23, 2025 2 release files No provenance

Jul 10, 2025 2 release files No provenance

Jul 1, 2025 2 release files No provenance

Jun 10, 2025 2 release files No provenance

May 28, 2025 2 release files No provenance

May 27, 2025 2 release files No provenance

May 22, 2025 2 release files No provenance

Apr 16, 2025 2 release files No provenance

Mar 21, 2025 2 release files No provenance

Mar 19, 2025 2 release files No provenance

Mar 17, 2025 2 release files No provenance

Mar 6, 2025 2 release files No provenance

Jan 28, 2025 2 release files No provenance

Jan 21, 2025 2 release files No provenance

Jan 15, 2025 2 release files No provenance

Jan 14, 2025 2 release files No provenance

Jan 6, 2025 2 release files No provenance

Dec 4, 2024 2 release files No provenance

Nov 18, 2024 2 release files No provenance

Nov 12, 2024 2 release files No provenance

Nov 8, 2024 2 release files No provenance

Nov 7, 2024 2 release files No provenance

Sep 17, 2024 2 release files No provenance

Sep 4, 2024 2 release files No provenance

Aug 22, 2024 2 release files No provenance

Aug 8, 2024 2 release files No provenance

Aug 7, 2024 2 release files No provenance

Aug 6, 2024 2 release files No provenance

Aug 1, 2024 1 release file No provenance

Jul 4, 2024 2 release files No provenance

Jun 19, 2024 2 release files No provenance

Jun 5, 2024 2 release files No provenance

May 29, 2024 2 release files No provenance

May 23, 2024 2 release files No provenance

Mar 26, 2024 2 release files No provenance

Mar 11, 2024 2 release files No provenance

Feb 26, 2024 2 release files No provenance

Jan 29, 2024 2 release files No provenance

Jan 15, 2024 2 release files No provenance

Dec 20, 2023 2 release files No provenance

Dec 11, 2023 2 release files No provenance

Dec 9, 2023 2 release files No provenance

"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.

© 2026 Python Software Foundation

Deployed from 1875753

Source Attribution: This report incorporates information referenced or syndicated from Pypi.org. Read original coverage at Pypi.org.

More from Technology →
Haldwani Times
Haldwani Times Independent News & Editorial
Login
MARKETS & FINANCE
BRENT CRUDE: $78.40 -0.52% SENSEX: 81,450.20 +0.42% NIFTY 50: 24,820.15 +0.38% GOLD (24K): ₹74,500/10g -0.18% USD/INR: ₹95.54 +0.10%

ADMINISTRATIVE LEADERSHIP

Mr. Narendra Modi
Mr. Narendra Modi
Mr. Lt. Gen. Gurmit Singh
Mr. Lt. Gen. Gurmit Singh
Mr. Pushkar S. Dhami
Mr. Pushkar S. Dhami
Mr. Lalit M. Rayal
Mr. Lalit M. Rayal
Mr. Gajraj S. Bisht
Mr. Gajraj S. Bisht

Top Headlines & Breaking Stories

View All News →

Haldwani Times – Everything in Haldwani: News, Shops, Businesses & Services

Haldwani Times is the premier digital news and commercial discovery platform built specifically for the citizens, business owners, students, professionals, and visitors of Haldwani, Nainital district, and the wider Kumaon region of Devbhoomi Uttarakhand. As the economic gateway to the Kumaon Himalayas, Haldwani is a bustling metropolis connecting the plains of northern India with the scenic mountain districts of Nainital, Almora, Pithoragarh, Bageshwar, Champawat, and Udham Singh Nagar. Haldwani Times serves as the definitive digital heartbeat of the city, bringing breaking hyperlocal news, verified commercial directories, educational updates, healthcare guides, Mandi Bhav rates, and civic announcements onto a single unified, trusted platform.

The Definitive Source for Breaking Haldwani News & Civic Updates

Haldwani stands as one of the fastest-growing urban conglomerates and commercial engines in northern India. Positioned in the fertile Terai-Bhabhar belt at the foothills of the Shivalik range, the twin cities of Haldwani and Kathgodam form the administrative and logistical nerve center for the entire Kumaon division. With rapid urbanization, expanding commercial infrastructure, flourishing educational centers, and increasing inter-state transit, the demand for fast, fact-checked, and unbiased local journalism has never been greater. Haldwani Times delivers 24/7 comprehensive news coverage built on rigorous journalistic standards: - **Hyperlocal Civic News:** Real-time coverage of municipal corporation affairs, city drainage projects, traffic management blueprints, and road widening drives across Tikonia, Mukhani, Kusumkhera, Bareilly Road, and Rampur Road. - **Administrative Directives:** Official notifications from the District Magistrate (DM) Nainital, Senior Superintendent of Police (SSP), and state secretariat decisions affecting citizen welfare. - **Kumaon Weather & Disaster Alerts:** Timely mountain rainfall warnings, landslide advisories along NH-109 (Haldwani-Nainital Highway), and emergency bulletins during the monsoon and winter seasons. - **Education & Campus News:** Timely reports on Kumaon University examination schedules, Uttarakhand Board (UBSE) results, medical college admissions, and competitive coaching updates. - **Commercial & Market Trends:** Daily wholesale Mandi Bhav rates from Haldwani Subzi Mandi, real estate trends, retail market festivals, and local business openings. - **Cultural & Pahadi Heritage:** In-depth feature stories celebrating Kumaoni folk traditions, Aipan art, Nanda Devi festivals, and local community milestones.

Everything in Haldwani on One Unified Digital Ecosystem

Beyond traditional news reporting, Haldwani Times is engineered as an exhaustive local discovery engine. Historically, finding verified local business telephone numbers, emergency hospital contacts, specialized doctors, reliable plumbers, or trusted real estate consultants in Haldwani required asking neighbors or browsing outdated social media posts. Haldwani Times eliminates this friction by organizing every commercial, professional, and civic resource into searchable, verified categories. Whether you are a newly arrived resident in Kusumkhera looking for high-speed broadband providers, a parent searching for reputable CBSE schools near Kaladhungi Road, or a tourist seeking taxi rentals to Nainital, our portal delivers accurate, verified, and actionable information in seconds.

Local Shops, Retail Hubs & Traditional Bazaars in Haldwani

The retail commerce of Haldwani spans centuries-old traditional bazaars and modern commercial complexes: - **Bada Bazaar & Mangal Parao:** The historic retail heart of Haldwani, renowned for traditional Kumaoni wedding jewelry (Pauji, Guloband, Nath), brass utensils, ethnic handlooms, and wholesale clothing. - **Nainital Road & Tikonia Commercial Corridor:** Modern multi-brand retail showrooms, electronics stores, authorized smartphone service centers, branded footwear outlets, and international apparel stores. - **Bareilly Road & Rampur Road Trade Hubs:** Major agricultural machinery dealers, hardware and building material wholesalers, furniture manufacturing units, plywood distributors, and automobile showrooms. - **Subzi Mandi & Wholesale Grain Market:** One of the largest agricultural distribution centers in North India, supplying fresh vegetables, hill fruits (apples, peaches, plums), and organic Pahadi pulses (Gahat, Bhatt, Rajma) across northern states.

Healthcare Hub of Kumaon: Hospitals & Emergency Services

Haldwani serves as the premier medical lifeline for all six hill districts of Kumaon. Patients travel from Almora, Pithoragarh, Bageshwar, and Champawat to access specialized clinical treatments in Haldwani: - **Government Healthcare Institutions:** Dr. Susheela Tiwari Government Medical College & Hospital (STGH) and Base Hospital Haldwani provide tertiary trauma care, specialized super-specialties, pediatric ICUs, and 24/7 emergency response. - **Private Multi-Specialty Hospitals:** Advanced private medical centers specializing in cardiology, joint replacements, neurology, critical care, nephrology, and advanced laparoscopic surgeries. - **Diagnostic Centers & 24/7 Pharmacies:** Fully automated pathology laboratories, high-resolution MRI/CT scan centers, and round-the-clock emergency pharmacies clustered around Medical College Road, Kaladhungi Road, and Rampur Road.

Education, Colleges, Coaching Academies & Youth Development

Haldwani is the educational capital of the Kumaon region, home to thousands of ambitious students preparing for medical, engineering, defense, and civil services careers: - **Premier Degree Colleges:** Motiram Baburam Government Post Graduate College (MBPG College) and Women's Degree College providing extensive undergraduate and postgraduate humanities, commerce, and science programs. - **Competitive Coaching Ecosystem:** Highly reputed coaching academies for NEET UG, JEE Main & Advanced, UPSC Civil Services, UKPSC/UKSSSC, NDA, CDS, and Banking examinations along Kaladhungi Road and Tikonia. - **Affiliated Schooling Infrastructure:** Esteemed CBSE, ICSE, and Uttarakhand Board schools imparting value-based holistic education with modern sports and laboratory facilities.

Real Estate, Housing Colonies & Urban Expansion Trends

Driven by rapid infrastructure expansion and high quality of life, Haldwani's real estate market is expanding outward into organized residential colonies: - **Prime Residential Localities:** Highly sought-after residential sectors in Mukhani, Kusumkhera, Kaladhungi Road, Judge Farm, Daharia, and Bhotia Parao offering planned housing, green parks, and modern civic amenities. - **Commercial Property Investments:** Thriving commercial retail complexes, office spaces, and warehouse hubs developing rapidly along the proposed Haldwani Ring Road and transport corridors. - **Property Advisory & RERA Compliance:** In-depth real estate updates, circle rate revisions by the Nainital district administration, and buyer advisory guidelines for safe property acquisitions.

Strategic Transit Gateway, Tourism Routes & Kumaon Himalayan Connectivity

Haldwani-Kathgodam is the vital transit bridge connecting the plains of Delhi NCR and Uttar Pradesh with the hill stations of Uttarakhand: - **Kathgodam Railway Terminal:** Connecting Kumaon directly to New Delhi (Shatabdi Express, Ranikhet Express), Lucknow, Kolkata, Jammu, and Dehradun. - **ISBT Haldwani:** Operating round-the-clock interstate and mountain bus routes managed by Uttarakhand Transport Corporation (UTC) and private deluxe coaches. - **Pantnagar Airport (PGH):** Located just 26 km from Haldwani, offering scheduled domestic flights to New Delhi, Dehradun, Pithoragarh, and regional hubs. - **Himalayan Tourism Hub:** The primary staging point for journeys to Nainital (34 km), Bhimtal (30 km), Mukteshwar (72 km), Kainchi Dham (42 km), Almora (90 km), Ranikhet (80 km), and Jim Corbett National Park (55 km).

Gaula River Mining, Ecological Balance & The Bhabhar Economy

The Gaula River represents the undisputed economic and hydrological lifeline of Haldwani and the broader Nainital district. Originating from the Sattal-Bhimtal catchment in the lesser Himalayas, the river flows south past Kathgodam and Haldwani before merging into the Ramganga. For generations, the Gaula riverbed has provided the foundation for both regional agriculture and the construction economy across northern India: - **Regulated Minor Mineral Extraction:** During the open mining season (typically October to May), thousands of registered tractor-trolleys and heavy dumpers harvest riverbed gravel, sand, and boulders under strict surveillance by the Uttarakhand Forest Development Corporation and the Nainital district administration. - **Livelihood Support for Over 50,000 Families:** The Gaula mining economy directly and indirectly sustains vehicle owners, drivers, mechanics, diesel pump stations, roadside eateries, and local laborers, circulating over ₹500 crore into Haldwani's local markets annually. - **Environmental Safeguards & Flood Mitigation:** In strict adherence to High Court and National Green Tribunal (NGT) directives, scientific replenishment studies, satellite GPS tracking on transport vehicles, and seasonal mining bans during the monsoon protect the river's ecological balance and prevent bank erosion along low-lying residential sectors.

Culinary Landscape: From Traditional Kumaoni Rasoi to Modern Cafes

Haldwani's gastronomic scene reflects a delightful blend of rustic mountain traditions and cosmopolitan dining: - **Authentic Kumaoni Specialties:** Local restaurants and heritage dhabas serve traditional mountain delicacies cooked in iron vessels, including Bhatt ki Churkani (black soybean curry), Gahat ke Dubke (horsegram puree), Aloo ke Gutke tempered with wild Himalayan chives (Jamboo) and Jakhiya, and refreshing cucumber Raita flavored with freshly crushed mustard seeds. - **Traditional Confectioneries:** Historic sweet shops along Bada Bazaar and Nainital Road craft Almora's world-famous Bal Mithai (roasted caramelized khoya fudge coated in sugar balls) and Singaudi (sweetened khoya wrapped in wild Malu leaves). - **Vibrant Street Food & Cafe Culture:** As dusk falls, Tikonia and Nainital Road come alive with bustling street food stalls offering steaming Tibetan momos, spiced thukpa, Kathi rolls, and hot Masala Chai, alongside modern rooftop cafes serving specialty Italian coffees and continental snacks.

Cultural Festivals, Folk Heritage & The Aipan Art of Kumaon

Beyond commercial enterprise, Haldwani is the proud cultural showcase of Devbhoomi Uttarakhand: - **Aipan Folk Art Tradition:** The sacred geometrical floor and wall art handcrafted with red ochre (Geru) and white rice paste (Biswar) adorning thresholds, altars, and chowkis during auspicious ceremonies, now preserved through local women's self-help cooperatives. - **Classical Baithki & Khadi Holi:** Unique to Kumaon, musical celebrations starting as early as the month of Paush, featuring classical Hindustani ragas sung in community courtyards followed by energetic Chholiya dance performances during spring. - **Nanda Devi & Chholiya Heritage:** Grand annual fairs celebrating the patron deity Nanda Devi, accompanied by martial sword-and-shield Chholiya dancers whose rhythmic brass trumpets (Ransingha) and hurka drums resonate through the valley.

Public Amenities, Parks & Community Spaces in Haldwani

Urban lifestyle and recreational infrastructure in the city: - **Green Parks & Walking Tracks:** Walkway projects around Daharia, Judge Farm, and Awas Vikas providing lush recreational zones for families and seniors. - **Community Centers & Sports Grounds:** Multi-purpose auditoriums and grounds hosting cultural melas, badminton tournaments, and community celebrations. - **Gaula Barrage & Forest Trails:** Scenic river viewpoints and natural birdwatching areas attracting eco-tourists and local nature enthusiasts on weekends.

Frequently Asked Questions (FAQs)

How can I access live breaking news and weather alerts for Haldwani?

Haldwani Times operates a dedicated 24/7 hyperlocal newsroom providing real-time breaking bulletins, traffic alerts, and meteorological warnings. You can access live news directly from our homepage, subscribe to instant browser push notifications, or view categorical updates on Uttarakhand, Education, and Mandi Bhav. During monsoon and winter weather events, our correspondents provide live updates on NH-109 road blockages and emergency administrative orders issued by the Nainital District Magistrate.

Is Haldwani Times completely free to read for all visitors?

Yes, Haldwani Times offers completely unrestricted, open-access reading to all users without mandatory paywalls. Readers across Haldwani, Uttarakhand, and the global diaspora can freely browse all breaking news reports, investigative articles, business directory listings, and historical archives. Our public-interest mission ensures that essential civic information, emergency hospital directories, and educational circulars remain universally accessible to everyone at zero cost.

How can local business owners list their shop or service in the Haldwani directory?

Local merchants, medical practitioners, schools, and service professionals can register their business by navigating to our 'Business Directory' page and selecting 'Add Listing'. The registration process allows you to input your business name, address, contact numbers, operational hours, services offered, and high-resolution showroom photographs. Once submitted, our local verification team verifies the physical address within 24 hours to ensure high consumer trust and top ranking on Google.

Can I read Haldwani Times articles in Hindi as well as English?

Yes, Haldwani Times features a seamless, native bilingual reading experience tailored for our regional readership. With our one-click language toggle located prominently in the navigation bar, you can instantly switch between English and pure Hindi. Both versions feature carefully crafted editorial phrasing, accurate regional terminology, and culturally resonant storytelling to ensure maximum readability for students, families, and senior citizens alike.

How do I submit news tips, event notices, or press releases to the editorial team?

Our newsroom warmly welcomes verified news tips, community event notices, civic grievances, and official press releases from citizens and local organizations. You can submit your documents, photos, or video evidence directly to our central editorial desk at editorial@haldwanitimes.com or via our Help & Support page. Our senior editors review every submission for factual authenticity, multi-source verification, and public relevance prior to publication.

Where can visitors find authentic Kumaoni Bal Mithai and Singaudi in Haldwani?

Renowned traditional sweet houses clustered along Bada Bazaar, Mangal Parao, Kathgodam Station Road, and Nainital Road specialize in daily batches of authentic Bal Mithai and fragrant Singaudi prepared with pure mountain dairy khoya and natural ingredients.

What transportation options are available for traveling from Haldwani to Nainital and Bhimtal?

Continuous state transport buses (UTC), KMOU coaches, and registered taxi union sharing cabs operate 24/7 from the Haldwani Roadways Bus Station (near Tikonia) and Kathgodam Railway Station. Fares are regulated by the transport department, with mountain travel times ranging between 1 to 1.5 hours.