Skip to main content

adsk-platform-httpclient

Shared HTTP client, authentication, and middleware utilities for Autodesk Platform Services Python SDKs.

This package provides the foundational components used by all adsk-platform-* SDK packages.

Installation

pip install adsk-platform-httpclient

Note: You typically don't need to install this package directly. It's automatically included as a dependency of the SDK packages (e.g., adsk-platform-acc, adsk-platform-data-management).

Components

HttpClientFactory

Creates pre-configured httpx.AsyncClient instances and Kiota request adapters with bearer-token authentication and the custom middleware pipeline.

from autodesk_common_httpclient import HttpClientFactory

async def get_access_token() -> str:
    return "YOUR_ACCESS_TOKEN"

# Create a Kiota request adapter with authentication + middleware
adapter = HttpClientFactory.create_adapter(get_access_token)

# Or provide your own httpx client
import httpx
custom_client = httpx.AsyncClient(timeout=60.0)
adapter = HttpClientFactory.create_adapter(get_access_token, http_client=custom_client)

AccessTokenProviderCallback

Wraps an async callback into a Kiota-compatible AccessTokenProvider.

from autodesk_common_httpclient import AccessTokenProviderCallback

provider = AccessTokenProviderCallback(get_access_token)

Custom Middleware

The package includes three custom middleware handlers that are automatically added to the HTTP pipeline, matching the C# Autodesk.Common.HttpClientLibrary.Middleware:

ErrorHandler

Raises an httpx.HTTPStatusError when the HTTP response has a non-success status code (4xx/5xx). Enabled by default.

from autodesk_common_httpclient import ErrorHandlerOption

# Disable for a specific request
error_option = ErrorHandlerOption(enabled=False)

QueryParameterHandler

Appends or overwrites query parameters on every outgoing request. Useful for injecting API versions, region codes, or tracking identifiers.

from autodesk_common_httpclient import QueryParameterHandlerOption

query_option = QueryParameterHandlerOption(query_parameters={"region": "US"})

RateLimitingHandler

Limits the number of concurrent requests per endpoint within a sliding time window. Disabled by default.

from autodesk_common_httpclient import RateLimitingHandlerOption

# Allow max 10 requests per endpoint per 60 seconds
rate_option = RateLimitingHandlerOption()
rate_option.set_rate_limit(max_requests=10, time_window_seconds=60.0)

Creating a client with rate limiting

from autodesk_common_httpclient import HttpClientFactory

# Create an HTTP client with rate limiting enabled
client = HttpClientFactory.create_with_rate_limit(
    max_requests=10,
    time_window_seconds=60.0,
)

# Use it with any SDK client
adapter = HttpClientFactory.create_adapter(get_access_token, http_client=client)

Middleware Pipeline Order

The middleware is executed in this order (matching the C# implementation):

  1. Kiota defaults — Redirect, Retry, Parameters Name Decoding, URL Replace, User Agent, Headers Inspection
  2. RateLimitingHandler — Per-endpoint rate limiting
  3. QueryParameterHandler — Query parameter injection
  4. ErrorHandler — Error response detection

Requirements

  • Python 3.10 or later

License

This project is licensed under the MIT License.

Metadata

Release files for adsk-platform-httpclient 0.2.10

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

Source distribution (sdist)

Source distribution for adsk-platform-httpclient 0.2.10
File Size Uploaded Provenance
adsk_platform_httpclient-0.2.10.tar.gz 8.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for adsk-platform-httpclient 0.2.10
File Interpreter ABI Platform
adsk_platform_httpclient-0.2.10-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / adsk_platform_httpclient-0.2.10.tar.gz

Download URL adsk_platform_httpclient-0.2.10.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
74492127495645f0b5a097a5962ab966b2dc135e274623f334775ca36a2c0a12
BLAKE2b-256 checksum
How to use checksums
64b9c8a3d16218cf0596d8e4536c5bfe813a4b3bb879618abe525e32e039c44a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

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 Feb 23, 2026.

Transparency log

Release files / adsk_platform_httpclient-0.2.10-py3-none-any.whl

Download URL adsk_platform_httpclient-0.2.10-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3add18d1f2f937b2aa365ca33c21135d3bb3650f0983647debe7a7ffeae69e8
BLAKE2b-256 checksum
How to use checksums
c08b1af8090e084969b12df97c642f377105ed6f7795c831d86367d41a68cbc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

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 Feb 23, 2026.

Transparency log

Security for adsk-platform-httpclient 0.2.10

Provenance

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for adsk_platform_httpclient-0.2.10.tar.gz

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 Feb 23, 2026.

Transparency log

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

This release

0.2.10 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page