Core HTTP shared client library for Python¶
corehttp
provides shared exceptions and modules for Python SDK client libraries.
Getting started¶
Typically, you will not need to install corehttp
, as it will be installed when you install one of the client libraries using it.
Transports¶
To use corehttp
, you will need to choose a transport implementation. corehttp
provides the following transports:
Synchronous transports:
RequestsTransport
- A synchronous transport based on the Requests library.HttpXTransport
- An synchronous transport based on the HTTPX library.
Asynchronous transports:
AioHttpTransport
- An asynchronous transport based on the aiohttp library.AsyncHttpXTransport
- An asynchronous transport based on the HTTPX library.
Each transport has its own dependencies, which you can install using the corehttp
extras:
# Install individually.
pip install corehttp[requests]
pip install corehttp[aiohttp]
pip install corehttp[httpx]
# Install multiple.
pip install corehttp[requests,httpx]
If no transports are specified, corehttp
will default to using RequestsTransport
for synchronous pipeline requests and AioHttpTransport
for asynchronous pipeline requests.
Contributing¶
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Indices and tables¶
Developer Documentation
- corehttp package
MatchConditions
- Subpackages
- corehttp.rest package
AsyncHttpResponse
AsyncHttpResponse.close()
AsyncHttpResponse.iter_bytes()
AsyncHttpResponse.iter_raw()
AsyncHttpResponse.json()
AsyncHttpResponse.raise_for_status()
AsyncHttpResponse.read()
AsyncHttpResponse.text()
AsyncHttpResponse.content
AsyncHttpResponse.content_type
AsyncHttpResponse.encoding
AsyncHttpResponse.headers
AsyncHttpResponse.is_closed
AsyncHttpResponse.is_stream_consumed
AsyncHttpResponse.reason
AsyncHttpResponse.request
AsyncHttpResponse.status_code
AsyncHttpResponse.url
HttpRequest
HttpResponse
HttpResponse.close()
HttpResponse.iter_bytes()
HttpResponse.iter_raw()
HttpResponse.json()
HttpResponse.raise_for_status()
HttpResponse.read()
HttpResponse.text()
HttpResponse.content
HttpResponse.content_type
HttpResponse.encoding
HttpResponse.headers
HttpResponse.is_closed
HttpResponse.is_stream_consumed
HttpResponse.reason
HttpResponse.request
HttpResponse.status_code
HttpResponse.url
- corehttp.runtime package
- corehttp.transport package
- corehttp.utils package
CaseInsensitiveDict
CaseInsensitiveDict.clear()
CaseInsensitiveDict.copy()
CaseInsensitiveDict.get()
CaseInsensitiveDict.items()
CaseInsensitiveDict.keys()
CaseInsensitiveDict.lowerkey_items()
CaseInsensitiveDict.pop()
CaseInsensitiveDict.popitem()
CaseInsensitiveDict.setdefault()
CaseInsensitiveDict.update()
CaseInsensitiveDict.values()
CaseInsensitiveEnumMeta
case_insensitive_dict()
- corehttp.rest package
- Submodules
- corehttp.credentials module
- corehttp.exceptions module
BaseError
ClientAuthenticationError
ClientAuthenticationError.add_note()
ClientAuthenticationError.with_traceback()
ClientAuthenticationError.args
ClientAuthenticationError.continuation_token
ClientAuthenticationError.exc_msg
ClientAuthenticationError.exc_traceback
ClientAuthenticationError.exc_type
ClientAuthenticationError.exc_value
ClientAuthenticationError.inner_exception
ClientAuthenticationError.message
DecodeError
DeserializationError
HttpResponseError
ResourceExistsError
ResourceExistsError.add_note()
ResourceExistsError.with_traceback()
ResourceExistsError.args
ResourceExistsError.continuation_token
ResourceExistsError.exc_msg
ResourceExistsError.exc_traceback
ResourceExistsError.exc_type
ResourceExistsError.exc_value
ResourceExistsError.inner_exception
ResourceExistsError.message
ResourceExistsError.reason
ResourceExistsError.response
ResourceExistsError.status_code
ResourceModifiedError
ResourceModifiedError.add_note()
ResourceModifiedError.with_traceback()
ResourceModifiedError.args
ResourceModifiedError.continuation_token
ResourceModifiedError.exc_msg
ResourceModifiedError.exc_traceback
ResourceModifiedError.exc_type
ResourceModifiedError.exc_value
ResourceModifiedError.inner_exception
ResourceModifiedError.message
ResourceModifiedError.reason
ResourceModifiedError.response
ResourceModifiedError.status_code
ResourceNotFoundError
ResourceNotFoundError.add_note()
ResourceNotFoundError.with_traceback()
ResourceNotFoundError.args
ResourceNotFoundError.continuation_token
ResourceNotFoundError.exc_msg
ResourceNotFoundError.exc_traceback
ResourceNotFoundError.exc_type
ResourceNotFoundError.exc_value
ResourceNotFoundError.inner_exception
ResourceNotFoundError.message
ResourceNotFoundError.reason
ResourceNotFoundError.response
ResourceNotFoundError.status_code
ResourceNotModifiedError
ResourceNotModifiedError.add_note()
ResourceNotModifiedError.with_traceback()
ResourceNotModifiedError.args
ResourceNotModifiedError.continuation_token
ResourceNotModifiedError.exc_msg
ResourceNotModifiedError.exc_traceback
ResourceNotModifiedError.exc_type
ResourceNotModifiedError.exc_value
ResourceNotModifiedError.inner_exception
ResourceNotModifiedError.message
ResourceNotModifiedError.reason
ResourceNotModifiedError.response
ResourceNotModifiedError.status_code
ResponseNotReadError
ResponseNotReadError.add_note()
ResponseNotReadError.with_traceback()
ResponseNotReadError.args
ResponseNotReadError.continuation_token
ResponseNotReadError.exc_msg
ResponseNotReadError.exc_traceback
ResponseNotReadError.exc_type
ResponseNotReadError.exc_value
ResponseNotReadError.inner_exception
ResponseNotReadError.message
SerializationError
ServiceRequestError
ServiceRequestError.add_note()
ServiceRequestError.with_traceback()
ServiceRequestError.args
ServiceRequestError.continuation_token
ServiceRequestError.exc_msg
ServiceRequestError.exc_traceback
ServiceRequestError.exc_type
ServiceRequestError.exc_value
ServiceRequestError.inner_exception
ServiceRequestError.message
ServiceResponseError
ServiceResponseError.add_note()
ServiceResponseError.with_traceback()
ServiceResponseError.args
ServiceResponseError.continuation_token
ServiceResponseError.exc_msg
ServiceResponseError.exc_traceback
ServiceResponseError.exc_type
ServiceResponseError.exc_value
ServiceResponseError.inner_exception
ServiceResponseError.message
StreamClosedError
StreamConsumedError
StreamConsumedError.add_note()
StreamConsumedError.with_traceback()
StreamConsumedError.args
StreamConsumedError.continuation_token
StreamConsumedError.exc_msg
StreamConsumedError.exc_traceback
StreamConsumedError.exc_type
StreamConsumedError.exc_value
StreamConsumedError.inner_exception
StreamConsumedError.message
- corehttp.paging module
- corehttp.serialization module