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.17.0-cp38-abi3-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.8+Windows x86-64

raps_bindings-4.17.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

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

raps_bindings-4.17.0-cp38-abi3-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

raps_bindings-4.17.0-cp38-abi3-macosx_10_12_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for raps_bindings-4.17.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d5b23483c125bc6d4397942927cc2e52e7c138b8befbc041951ae8a48b8ffe71
MD5 b43185474981a658feab564398746a1e
BLAKE2b-256 a30e1bf5324318d44b76291575126f499689379d4a28d70742848333ad361f29

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.17.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.17.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for raps_bindings-4.17.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ac04777a9e05962eb14b472b33a1d35e2c61ec685475121237c332b6a9c95e8
MD5 0694a42c83844c6e6fcfae72b643584b
BLAKE2b-256 b944429528cb809a3fc24e28f8fd75ebdf839e6c4db8a40c9023f74251253c73

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.17.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.17.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for raps_bindings-4.17.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e56cd5dcbf8cc9c4115d34f41a02d3288617dd56b558b631549953a015b7360
MD5 40793620a7ed207813411b2366a86cd4
BLAKE2b-256 36cdf925d11bcb757ae9e3493f455fba0393ff24b3fcb08447551c3e0611731b

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.17.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.17.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for raps_bindings-4.17.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c54dde5aac83b7af925a4dd9c1c6d3f190321fd954f771321726ac0d836c4568
MD5 a21b670398e7ea2a5848c0d8308cdccb
BLAKE2b-256 e0faf05cdb75c46b100e74e7c36c2a0b9ab1e2be15ea98eae742ae580b6d7c41

See more details on using hashes here.

Provenance

The following attestation bundles were made for raps_bindings-4.17.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