{"id":1551,"library":"microsoft-kiota-http","title":"Microsoft Kiota HTTP","description":"microsoft-kiota-http provides the core abstractions and implementations for making HTTP requests in Kiota-generated Python SDKs. It offers request adapters that integrate with popular HTTP clients like `requests` and `httpx`, handling the underlying network communication and request serialization/deserialization. The library is part of the broader Microsoft Kiota ecosystem, receiving frequent updates to synchronize with other Kiota packages.","status":"active","version":"1.10.1","language":"en","source_language":"en","source_url":"https://github.com/microsoft/kiota-python","tags":["kiota","microsoft","http","sdk","client-generation","rest","graphql"],"install":[{"cmd":"pip install microsoft-kiota-http","lang":"bash","label":"Install core http client"},{"cmd":"pip install microsoft-kiota-http microsoft-kiota-authentication-anonymous","lang":"bash","label":"Install with anonymous authentication for quickstart"}],"dependencies":[{"reason":"Provides core interfaces like RequestAdapter and AuthenticationProvider that this library implements or uses.","package":"microsoft-kiota-abstractions","optional":false},{"reason":"Default underlying HTTP client for RequestsRequestAdapter.","package":"requests","optional":true},{"reason":"Underlying HTTP client for HttpxRequestAdapter.","package":"httpx","optional":true},{"reason":"Required for the provided quickstart example to create a basic, runnable Kiota client adapter.","package":"microsoft-kiota-authentication-anonymous","optional":true}],"imports":[{"symbol":"RequestsRequestAdapter","correct":"from microsoft.kiota.http.requests_request_adapter import RequestsRequestAdapter"},{"note":"Use this if you prefer `httpx` over `requests` as the underlying HTTP client.","symbol":"HttpxRequestAdapter","correct":"from microsoft.kiota.http.httpx_request_adapter import HttpxRequestAdapter"}],"quickstart":{"code":"import os\nfrom microsoft.kiota.authentication.anonymous.anonymous_authentication_provider import AnonymousAuthenticationProvider\nfrom microsoft.kiota.http.requests_request_adapter import RequestsRequestAdapter\n\n# 1. Initialize an AuthenticationProvider.\n#    For real applications, you'd use a provider like AzureIdentityAuthenticationProvider.\nauth_provider = AnonymousAuthenticationProvider()\n\n# 2. Create a RequestAdapter using a Kiota HTTP client implementation.\n#    RequestsRequestAdapter uses the 'requests' library by default.\n#    Alternatively, use HttpxRequestAdapter for 'httpx'.\nrequest_adapter = RequestsRequestAdapter(auth_provider)\n\n# The 'request_adapter' can now be passed to a Kiota-generated API client.\n# Example: my_client = MyGeneratedApiClient(request_adapter)\n\nprint(\"Kiota HTTP Request Adapter initialized successfully.\")\nprint(f\"Using adapter type: {type(request_adapter).__name__}\")\n\n# This quickstart does not perform an actual API call as it requires a generated client.","lang":"python","description":"This example demonstrates how to initialize a `RequestsRequestAdapter`, which is the entry point for making HTTP requests with a Kiota-generated client. It uses the `AnonymousAuthenticationProvider` for simplicity; real applications would use a production-ready authentication provider."},"warnings":[{"fix":"Upgrade your Python environment to version 3.10 or newer. If you must use Python 3.9, pin your `microsoft-kiota-http` version to `<1.10.0`.","message":"Starting with version 1.10.0, support for Python 3.9 has been dropped. Ensure your environment uses Python 3.10 or higher.","severity":"breaking","affected_versions":">=1.10.0"},{"fix":"Always pass an instance of a class implementing `AuthenticationProvider` when creating a `RequestsRequestAdapter` or `HttpxRequestAdapter`.","message":"A `RequestAdapter` always requires an `AuthenticationProvider` during initialization, even if it's an `AnonymousAuthenticationProvider` for public/unauthenticated endpoints.","severity":"gotcha","affected_versions":"All"},{"fix":"Familiarize yourself with the Kiota code generation process and use `kiota generate` to create your specific SDK client.","message":"This package provides *factories* and *adapters* for HTTP communication. It does not provide the generated API client itself. You need to use the Kiota CLI to generate your client library, which will then depend on `microsoft-kiota-http`.","severity":"gotcha","affected_versions":"All"},{"fix":"Explicitly import and instantiate `RequestsRequestAdapter` or `HttpxRequestAdapter` based on your preferred HTTP client.","message":"There are distinct adapters for different underlying HTTP libraries (e.g., `RequestsRequestAdapter` for `requests`, `HttpxRequestAdapter` for `httpx`). Choose the one that best fits your project's existing dependencies or performance needs.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}