Skip to main content

aas-studio: Python SDK for AAS Studio

Typed, zero-dependency client for the AAS Studio public REST API. Drop a PDF datasheet, get a structured Asset Administration Shell extraction back.

Install

pip install aas-studio

Requires Python 3.9+. Uses only the standard library. No requests, no httpx, no pydantic.

Auth

Generate a Bearer key at https://aas-studio.eu/studio/settings/keys. Keys start with sk_aas_ and are shown ONCE, so store them in a secret manager.

import os
from aas_studio import AasStudioClient

aas = AasStudioClient(api_key=os.environ["AAS_STUDIO_KEY"])

Quickstart: extract from a PDF

with open("./datasheets/ur10e.pdf", "rb") as f:
    response = aas.extract(
        f.read(),
        file_name="ur10e.pdf",
        id_prefix="urn:acme:aas",
    )

result = response["result"]
print(f"Asset: {result['assetIdShort']} ({len(result['submodels'])} submodels)")
print(f"Provider: {response['provider']}")
for w in response["warnings"]:
    print("warn:", w)

Library: list and fetch saved extractions

# List
page = aas.list_extractions(limit=50)
for ex in page["extractions"]:
    print(f"{ex['id']}  {ex['name']}  ({ex['mode']}, {ex['sourceCount']} sources)")

# Detail: full audit-replay payload
detail = aas.get_extraction(page["extractions"][0]["id"])
print(detail["extraction"]["aas"])    # the AAS itself
print(detail["extraction"]["meta"])   # extractionMeta with traces + cert

Validate / fix existing AAS files

with open("aas.aasx", "rb") as f:
    result = aas.validate(f.read())
if not result["valid"]:
    for err in result["errors"]:
        print(err["message"])

with open("broken.xml", "rb") as f:
    fixed = aas.fix(f.read())
if fixed["changed"]:
    print(fixed["xml"])

Error handling

from aas_studio import (
    AasStudioError,
    AuthError,
    QuotaError,
    FileTooLargeError,
    ProviderError,
)

try:
    aas.extract(pdf_bytes)
except QuotaError as e:
    print(f"Quota: {e.used}/{e.limit} on plan {e.plan}")
except AuthError:
    print("Bad API key. Check the dashboard")
except FileTooLargeError:
    print("PDF over 20 MB. Split or compress before upload")
except ProviderError as e:
    print(f"Provider failed (id={e.request_id}). Retry-friendly.")
except AasStudioError as e:
    print(f"Other API error: {e} (status={e.status}, request_id={e.request_id})")

Every error carries .request_id (when the server emitted one) for support correlation. Quote it when you contact us.

Configuration

aas = AasStudioClient(
    api_key=os.environ["AAS_STUDIO_KEY"],

    # Self-hosted deployment? Point at your own URL:
    base_url="https://aas.yourcompany.com/api/v1",

    # Default per-call timeout in seconds (per-call override available).
    timeout=60.0,

    # Custom HTTP layer. Bring your own `requests`/`httpx` session.
    # Signature: (method, url, headers, body, timeout) -> (status, headers, body_bytes)
    http_client=my_http_client,
)

License

MIT. See LICENSE.

Links

Metadata

Release files for aas-studio 0.1.1

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

Source distribution (sdist)

Source distribution for aas-studio 0.1.1
File Size Uploaded Provenance
aas_studio-0.1.1.tar.gz 11.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aas-studio 0.1.1
File Interpreter ABI Platform
aas_studio-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.9 kB

Release files / aas_studio-0.1.1.tar.gz

Download URL aas_studio-0.1.1.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4a6610a167602ddb70bae2e6498a3dbb79151ac9e13962fc76b829a317010f85
BLAKE2b-256 checksum
How to use checksums
e1f741065b187102e3b1ab3b61916a44eaa6f7b640313ac1cf0ef8dc814caa8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / aas_studio-0.1.1-py3-none-any.whl

Download URL aas_studio-0.1.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c4904c2a2d3c1a1682c4e4d7ae5ad484b785a9ab89408ec189f8f6fc9bb62ce
BLAKE2b-256 checksum
How to use checksums
c38ffa50058a7a8d8b82a7c012a97e74423d11d395af785dce6438d893153f68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for aas-studio 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.1.1 This release

2 release files No 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