Skip to main content

Python bindings for RAPS - programmatic access to Autodesk Platform Services

Project description

RAPS Python Bindings

Native Python bindings for RAPS - programmatic access to Autodesk Platform Services.

Installation

pip install raps-bindings

Quick Start

from raps import Client

# Create client from environment variables
client = Client.from_env()

# Or with explicit credentials
client = Client(client_id="your_id", client_secret="your_secret")

# Test authentication
client.test_auth()

# List buckets
for bucket in client.buckets.list():
    print(f"{bucket.key}: {bucket.policy}")

# Create a bucket
bucket = client.buckets.create("my-bucket", policy="transient", region="US")

# Upload a file
obj = client.objects("my-bucket").upload("model.rvt")
print(f"Uploaded: {obj.urn}")

# Start translation
job = client.translate(obj.urn, output_format="svf2")
job = job.wait()
print(f"Translation {job.status}: {job.progress}")

Features

Authentication

  • 2-legged OAuth (Client Credentials)
  • Environment variable support (APS_CLIENT_ID, APS_CLIENT_SECRET)

Object Storage (OSS)

  • List, create, get, delete buckets
  • Upload, download, list, delete objects
  • Signed URL generation
  • Multipart upload for large files

Model Derivative

  • Start translation jobs
  • Check translation status
  • Wait for completion with polling

Data Management (requires 3-legged auth)

  • List hubs (requires prior raps auth login via CLI)

API Reference

Client

# Create from environment
client = Client.from_env()

# Create with explicit credentials
client = Client(client_id, client_secret, base_url=None)

# Test authentication
client.test_auth() -> bool

# Access managers
client.buckets -> BucketsManager
client.hubs -> HubsManager  # requires 3-legged auth
client.objects(bucket_key) -> ObjectsManager

# Translation
client.translate(urn, output_format="svf2", force=False) -> TranslationJob
client.get_translation_status(urn) -> TranslationJob
client.get_urn(bucket_key, object_key) -> str

BucketsManager

buckets.list(region=None, limit=None) -> List[Bucket]
buckets.create(key, policy="transient", region="US") -> Bucket
buckets.get(key) -> Bucket
buckets.delete(key) -> None

ObjectsManager

objects.list(limit=None) -> List[Object]
objects.upload(path, object_key=None) -> Object
objects.download(object_key, path) -> str
objects.delete(object_key) -> None
objects.signed_url(object_key, minutes=2) -> str

TranslationJob

job.urn: str
job.status: str  # pending, inprogress, success, failed, timeout
job.progress: str
job.wait(timeout=600, poll_interval=5) -> TranslationJob

Exceptions

  • RapsError - Base exception
  • AuthenticationError - Authentication failures
  • NotFoundError - Resource not found
  • RateLimitError - API rate limit exceeded
  • ValidationError - Invalid parameters

Requirements

Environment Variables

export APS_CLIENT_ID="your_client_id"
export APS_CLIENT_SECRET="your_client_secret"

License

Apache 2.0

Links

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

raps_bindings-4.3.0-cp38-abi3-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.8+Windows x86-64

raps_bindings-4.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

raps_bindings-4.3.0-cp38-abi3-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

raps_bindings-4.3.0-cp38-abi3-macosx_10_12_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file raps_bindings-4.3.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for raps_bindings-4.3.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de72ddf75117bf840b094a3de383fbb4130caceb39d95aff5cf5260c38ce85e6
MD5 a1fc567ebe295891c82980d2880b5160
BLAKE2b-256 b1bf3d940dd33fb13830712ca67030c254f9a96b18adfd569a69c94b9d423bb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.3.0-cp38-abi3-win_amd64.whl:

Publisher: release.yml on dmytro-yemelianov/raps

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

File details

Details for the file raps_bindings-4.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for raps_bindings-4.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ccc87395d578a88ad33d1104deb8f3aae7b10ac27a4f05f99dc07ce82273279
MD5 65547eb429aed5245359aa8fe1093db1
BLAKE2b-256 4382d382fe08f6dd944a478b9041ac56797d95fa4ec88c32b374f4d878bfaa20

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on dmytro-yemelianov/raps

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

File details

Details for the file raps_bindings-4.3.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for raps_bindings-4.3.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 544300c9f00bd19186e9b5f927d8b3b5c36ffc146400f8ba1222eef815cd97c8
MD5 817ca8827a4a205e8c6656b1ed67bd5a
BLAKE2b-256 c2c82f33f9ad53058480415e6ce72c35bb5143ee502cb65c2eca7e191bbe1573

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.3.0-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on dmytro-yemelianov/raps

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

File details

Details for the file raps_bindings-4.3.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for raps_bindings-4.3.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 601373c0887f92dbdbf875dac59b99bd5528a7fa38551fd29792b8e32ea4d162
MD5 d0217105e51f2afd0e772ebe6dd1a654
BLAKE2b-256 9bfb2efe58c2a07e45446d725f28dab0bc4842eda0b63024693525bc44220cd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.3.0-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on dmytro-yemelianov/raps

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