Catalog PyPI
PACKAGE EXPLORERView in registry

aas-studio

PyPI

Official Python SDK for AAS Studio. AI-powered Asset Administration Shell extraction from PDFs.

aasasset-administration-shellbattery-passportcatena-xdigital-product-passporteclassidtaiec-63278industry-4.0
Versions collected1
Direct dependencies0From release 0.1.1
Last observed20 Oct, 17:04 UTC

README

Version 0.1.1 documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.111 Aug 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
miguelreisrepo/aas-studio

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:04 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:0559bb86dc0f2b5e564d7e0775abc5934e43346dc657256f0847534aded81457