Registry / http-networking / microsoft-kiota-bundle

microsoft-kiota-bundle

JSON →
library1.10.3pypypiunverified

microsoft-kiota-bundle is a convenience meta-package that installs all core Microsoft Kiota Python libraries. Kiota is a command-line tool for generating API clients based on OpenAPI descriptions. This bundle provides the necessary runtime components, including abstractions, authentication via Azure Identity, HTTP client implementations (based on Requests and Httpx), and serialization for JSON, Text, Form, and Multipart formats. The current version is 1.10.1, with releases typically synchronized across the Kiota Python ecosystem.

pip install microsoft-kiota-bundle
INSTALL
IMPORT
SIG · MICROSOFT-KIOTA-BU
M
microsoft-kiota-bundle
http-networkingpythonv1.10.3
Install
3.4s avg
Import
Disk
55MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.10.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.000s · 97.3MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 3.4s · import 0.000s · 29MB
55MB installed
● package 55MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AzureIdentityAuthenticationProvider
from kiota_authentication_azure.azure_identity_authentication_provider import AzureIdentityAuthenticationProvider
from kiota_bundle import AzureIdentityAuthenticationProvider

This quickstart demonstrates how to set up core Kiota components using the `microsoft-kiota-bundle`. It initializes an `AzureIdentityAuthenticationProvider` for authentication (using `azure-identity` credentials), creates a `RequestsClient` for HTTP communication, and then uses Kiota's `RequestInformation` abstractions to make a simple GET request to Microsoft Graph. Note that in a real application, you would typically use a Kiota-generated client, which wraps these low-level components.

import asyncio import os from azure.identity import ClientSecretCredential from microsoft_kiota_authentication_azure.azure_identity_authentication_provider import AzureIdentityAuthenticationProvider from microsoft_kiota_http.requests_client import RequestsClient from microsoft_kiota_abstractions.request_information import RequestInformation from microsoft_kiota_abstractions.method import Method from microsoft_kiota_abstractions.base_request_configuration import BaseRequestConfiguration # --- Environment variables for Azure authentication --- # Replace with your actual values or set as environment variables TENANT_ID = os.environ.get('AZURE_TENANT_ID', 'YOUR_TENANT_ID') CLIENT_ID = os.environ.get('AZURE_CLIENT_ID', 'YOUR_CLIENT_ID') CLIENT_SECRET = os.environ.get('AZURE_CLIENT_SECRET', 'YOUR_CLIENT_SECRET') # Define the scopes required for your API calls SCOPES = [os.environ.get('AZURE_SCOPES', 'https://graph.microsoft.com/.default')] async def main(): if not all([TENANT_ID, CLIENT_ID, CLIENT_SECRET]): print("Please set AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET environment variables (or hardcode for testing).") print("Using dummy values for demonstration, this will likely fail.") # Use dummy values to allow execution for demonstration purposes if env vars are missing credential = ClientSecretCredential("dummy_tenant", "dummy_client", "dummy_secret") else: # 1. Initialize Azure Identity credential credential = ClientSecretCredential( tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET ) # 2. Create an Azure Identity Authentication Provider auth_provider = AzureIdentityAuthenticationProvider( credential=credential, scopes=SCOPES ) # 3. Create an HTTP Client using the authentication provider # The microsoft-kiota-bundle includes RequestsClient and HttpxClient http_client = RequestsClient(authentication_provider=auth_provider) # 4. Construct a Request Information object (typically done by a generated Kiota client) request_info = RequestInformation() request_info.http_method = Method.GET request_info.url_template = "https://graph.microsoft.com/v1.0/me" request_info.set_header("Accept", "application/json") print(f"Attempting to make a GET request to: {request_info.url_template}") try: # 5. Send the request and get the response response = await http_client.send(request_info, BaseRequestConfiguration()) if response: print(f"Response Status: {response.status_code}") # For a real Kiota generated client, the response would be deserialized automatically. # For demonstration, you might read the text content if successful. if 200 <= response.status_code < 300: body_content = await response.text() print(f"Response Body (truncated): {body_content[:500]}...") else: print(f"Error Response: {await response.text()}") else: print("No response received.") except Exception as e: print(f"An error occurred during the request: {e}") if __name__ == '__main__': asyncio.run(main())
kiota --version
Debug
Known issues
breakingSupport for Python 3.9 was dropped in `microsoft-kiota-bundle` version 1.10.0. Ensure your environment uses Python 3.10 or newer.
fix
Upgrade your Python environment to version 3.10 or later (e.g., Python 3.11, 3.12).
affects: >=1.10.0
gotchaThe `microsoft-kiota-bundle` package is a meta-package. While convenient, if you only need specific functionalities (e.g., only JSON serialization and no Azure authentication), you might prefer installing individual `microsoft-kiota-*` packages to reduce your dependency footprint.
fix
Review your project's specific needs. If minimal dependencies are critical, install `microsoft-kiota-abstractions` and only the serialization/HTTP/authentication packages you actively use (e.g., `pip install microsoft-kiota-abstractions microsoft-kiota-serialization-json microsoft-kiota-http`).
affects: All
gotchaThis bundle provides the *runtime* for Kiota-generated clients. The primary way to use Kiota is to first generate a client library from an OpenAPI description using the Kiota CLI. You typically won't interact directly with many of the bundle's components beyond setting up the `AuthenticationProvider` and `HttpClient`.
fix
Familiarize yourself with the Kiota CLI and the client generation process. The generated client library will encapsulate much of the complexity, calling into the methods provided by this bundle.
affects: All
gotchaWhile `microsoft-kiota-bundle` pulls in core Kiota dependencies, common external dependencies like `azure-identity` (for Azure authentication) and `requests` (for the default HTTP client) are not direct dependencies of the bundle itself but of its sub-packages. These still need to be installed for full functionality.
fix
Always install `azure-identity` and `requests` (or `httpx` if using `HttpxClient`) alongside the bundle: `pip install microsoft-kiota-bundle azure-identity requests`.
affects: All
Upgrade
Version history
1.10.3latest on PyPI · released Jun 8, 2026
Audit
Dependencies
microsoft-kiota-abstractionsrequiredCore interfaces and models for Kiota
microsoft-kiota-authentication-azurerequiredAzure Active Directory authentication
microsoft-kiota-httprequiredHTTP client implementation (Requests and Httpx based)
microsoft-kiota-serialization-jsonrequiredJSON serialization and deserialization
microsoft-kiota-serialization-textrequiredText serialization and deserialization
microsoft-kiota-serialization-formrequiredForm serialization and deserialization
microsoft-kiota-serialization-multipartrequiredMultipart form data serialization and deserialization
azure-identityrequiredRequired for AzureIdentityAuthenticationProvider to work
requestsrequiredRequired for RequestsClient HTTP implementation
Agent activity
35 hits · last 30 days
node
32
OpenAI (training)
1
Resources
microsoft-kiota-bundle — pip install microsoft-kiota-bundle · libregistry