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.
pip install microsoft-kiota-httpVerified import paths — ran on the pinned version, not inferred.
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.
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`.
Always pass an instance of a class implementing `AuthenticationProvider` when creating a `RequestsRequestAdapter` or `HttpxRequestAdapter`.
Familiarize yourself with the Kiota code generation process and use `kiota generate` to create your specific SDK client.
Explicitly import and instantiate `RequestsRequestAdapter` or `HttpxRequestAdapter` based on your preferred HTTP client.
Verify the correct name and availability of `microsoft-kiota-authentication-anonymous` on PyPI or your intended package index. If it's an intended dependency, ensure it's explicitly included in your `pip install` command or listed in your `requirements.txt`.
Do not attempt to `pip install microsoft-kiota-authentication-anonymous`. Instead, if you need the `AnonymousAuthenticationProvider`, import it directly from `microsoft_kiota_abstractions.authentication` after ensuring `microsoft-kiota-abstractions` is installed (it is a dependency of `microsoft-kiota-http`).