Skip to main content

Autodesk Platform: ACC (Autodesk Construction Cloud) SDK for Python

Project description

autodesk-acc - Autodesk Construction Cloud SDK for Python

A Python SDK providing a Fluent API for the Autodesk Construction Cloud (ACC) APIs, generated from the official OpenAPI specifications using Microsoft Kiota.

Installation

pip install adsk-platform-acc

Quick Start

from autodesk_acc import ACCClient

# Provide an async function that returns the access token
async def get_access_token() -> str:
    return "YOUR_ACCESS_TOKEN"

# Initialize the ACC client
acc_client = ACCClient(get_access_token)

Using with 2-Legged Authentication

For server-to-server communication using client credentials (2-legged OAuth), use the companion adsk-platform-authentication package:

pip install adsk-platform-authentication
import os
from autodesk_authentication import AuthenticationClient
from autodesk_acc import ACCClient

client_id = os.environ["APS_CLIENT_ID"]
client_secret = os.environ["APS_CLIENT_SECRET"]

auth_client = AuthenticationClient()
token = await auth_client.helper.get_two_legged_token(
    client_id,
    client_secret,
    scopes=["data:read", "data:write", "account:read"],
)

acc_client = ACCClient(lambda: token.access_token)

Usage Examples

Get Issues

# Get issues for a project
issues = await acc_client.issues.projects[project_id].issues.get()

for issue in issues.results or []:
    print(f"Issue: {issue.title} - Status: {issue.status}")

Get Clash Results

# Get clash test results
clash_tests = await acc_client.clash.containers[container_id].clash.tests.get()

Get Project Files

# Get files in a folder
files = await acc_client.files.projects[project_id].folders[folder_id].contents.get()

Get RFIs

# Get RFIs for a project
rfis = await acc_client.rfis.projects[project_id].rfis.get()

Using the .api Property

All endpoints are available through the acc_client.api property, which mirrors the full URL path. You can always use .api instead of (or in addition to) the shortcut properties:

# These two calls are exactly equivalent:
issues = await acc_client.issues.projects[project_id].issues.get()               # shortcut
issues = await acc_client.api.construction.issues.v1.projects[project_id].issues.get()  # full path via .api

Custom HTTP Client

You can provide your own httpx.AsyncClient instance for advanced scenarios:

import httpx

http_client = httpx.AsyncClient(timeout=60.0)
# Configure your client...

acc_client = ACCClient(get_access_token, http_client=http_client)

Rate Limiting

The SDK handles API rate limits automatically thanks to the built-in retry handler provided by the Kiota HTTP client. When the API returns a 429 Too Many Requests response, the SDK will:

  • Automatically retry the request with exponential backoff
  • Respect the Retry-After header returned by the API
  • Retry up to a configurable number of times before failing

This means you don't need to implement custom retry logic in your application — the SDK handles transient failures and rate limiting transparently.

Error Handling

The SDK uses Kiota's built-in error handling. API errors are raised as exceptions that you can catch:

from kiota_abstractions.api_error import APIError

try:
    issues = await acc_client.issues.projects[project_id].issues.get()
except APIError as e:
    print(f"Request failed: {e.message}")
    print(f"Status code: {e.response_status_code}")

API Structure

This SDK provides access to multiple ACC API endpoints through a unified client. Every endpoint is accessible via the acc_client.api property, which exposes the full generated API tree. For convenience, shortcut properties are also available on the client to skip the common path prefix — but they are entirely optional.

API Endpoint Path Shortcut Full .api equivalent
Accounts /hq/v1/accounts/* acc_client.accounts acc_client.api.hq.v1.accounts
Admin /construction/admin/v1/* acc_client.admin acc_client.api.construction.admin.v1
Assets /construction/assets/* acc_client.assets acc_client.api.construction.assets
AutoSpecs /construction/autospecs/v1/* acc_client.auto_specs acc_client.api.construction.autospecs.v1
Clash /bim360/clash/v3/* acc_client.clash acc_client.api.bim360.clash.v3
Cost /cost/v1/* acc_client.cost acc_client.api.cost.v1
Data Connector /dataconnector/v1/* acc_client.data_connector acc_client.api.data_connector.v1
Docs /bim360/docs/v1/* acc_client.docs acc_client.api.bim360.docs.v1
Files /construction/files/v1/* acc_client.files acc_client.api.construction.files.v1
Forms /construction/forms/v1/* acc_client.forms acc_client.api.construction.forms.v1
Index /construction/index/v2/* acc_client.index acc_client.api.construction.index.v2
Issues /construction/issues/v1/* acc_client.issues acc_client.api.construction.issues.v1
Locations /construction/locations/v2/* acc_client.locations acc_client.api.construction.locations.v2
ModelSet /bim360/modelset/v3/* acc_client.model_set acc_client.api.bim360.modelset.v3
Packages /construction/packages/v1/* acc_client.packages acc_client.api.construction.packages.v1
Photos /construction/photos/v1/* acc_client.photos acc_client.api.construction.photos.v1
RCM /construction/rcm/v1/* acc_client.rcm acc_client.api.construction.rcm.v1
Relationships /bim360/relationship/v2/* acc_client.relationships acc_client.api.bim360.relationship.v2
Reviews /construction/reviews/v1/* acc_client.reviews acc_client.api.construction.reviews.v1
RFIs /construction/rfis/v3/* acc_client.rfis acc_client.api.construction.rfis.v3
Sheets /construction/sheets/v1/* acc_client.sheets acc_client.api.construction.sheets.v1
Submittals /construction/submittals/v2/* acc_client.submittals acc_client.api.construction.submittals.v2
Takeoff /construction/takeoff/v1/* acc_client.takeoff acc_client.api.construction.takeoff.v1
Transmittals /construction/transmittals/v1/* acc_client.transmittals acc_client.api.construction.transmittals.v1

Note: You never need to use the shortcut properties. They simply save a few keystrokes by resolving the common path prefix for you. The acc_client.api property gives you access to the complete API surface — including any endpoints that may not have a dedicated shortcut.

Requirements

  • Python 3.10 or later
  • Valid Autodesk Platform Services (APS) access token with appropriate scopes

Dependencies

  • microsoft-kiota-abstractions
  • microsoft-kiota-http
  • microsoft-kiota-serialization-json
  • microsoft-kiota-serialization-text
  • microsoft-kiota-serialization-form
  • microsoft-kiota-serialization-multipart
  • httpx

Documentation

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adsk_platform_acc-0.2.10.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adsk_platform_acc-0.2.10-py3-none-any.whl (3.5 MB view details)

Uploaded Python 3

File details

Details for the file adsk_platform_acc-0.2.10.tar.gz.

File metadata

  • Download URL: adsk_platform_acc-0.2.10.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for adsk_platform_acc-0.2.10.tar.gz
Algorithm Hash digest
SHA256 530f8a7d50dafb020c8df8f9e70d0bb60c9bf005d065cd2f3fcc2812b38a8870
MD5 5c578f2fac631ae9a2b28d901efd4e1f
BLAKE2b-256 27781dfdb161da76d4045dbdef2d2d4c36d279f93e2df6c3a831a674cdb0bc3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for adsk_platform_acc-0.2.10.tar.gz:

Publisher: publishPyPi.yml on adsk-duszykf/Adsk.Platform.Toolkit.Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file adsk_platform_acc-0.2.10-py3-none-any.whl.

File metadata

File hashes

Hashes for adsk_platform_acc-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c98ca0f549864db551cf24320ac9f5f3f053fae152cf3b12e25a0564833d2a9a
MD5 f8cca185491ec4fdd32c339fa08f3a1e
BLAKE2b-256 ca625f4e193cc0736c728734f195da3118cb989044d0a2e81be472e56a2983b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for adsk_platform_acc-0.2.10-py3-none-any.whl:

Publisher: publishPyPi.yml on adsk-duszykf/Adsk.Platform.Toolkit.Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page