Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

aas-package3-python

Continuous integration Documentation Test coverage PyPI - version PyPI - Python Version

Aas-package3-python is a library for reading and writing packaged file format of an Asset Administration Shell (AAS) in Python.

Status

The library is thoroughly tested and meant to be used in production.

The library is written in pure Python with no external dependencies beyond the standard library. Python 3.10 or later is required.

Documentation

The documentation is available at https://eclipse-aascw.github.io/aas-package3-python/.

Teaser

Here are short snippets to demonstrate how you can use the library.

To create and write to a package:

import aas_package3

# General packaging handler to be shared across the program
packaging = aas_package3.Packaging()

spec_content = b'{"assetAdministrationShells": []}'
thumbnail_content = b"..."  # PNG bytes
supplementary_content = b"..."  # PDF bytes

# Create a package
with packaging.create("some-file.aasx") as pkg:
    spec = pkg.make_spec(
        pkg.put_part(
            "/aasx/some-company/data.json", "application/json", spec_content
        )
    )

    pkg.set_thumbnail(
        pkg.put_part("/some-thumbnail.png", "image/png", thumbnail_content)
    )

    pkg.relate_supplementary_to_spec(
        pkg.put_part(
            "/aasx-suppl/some-company/some-manual.pdf",
            "application/pdf",
            supplementary_content,
        ),
        spec,
    )

# The changes are written when the with-block finishes without an exception.

To read from the package:

import aas_package3

# General packaging handler to be shared across the program
packaging = aas_package3.Packaging()

# Read from the package
with packaging.open_read("some-file.aasx") as pkg:
    # Read the specs
    specs_by_content_type = pkg.specs_by_content_type()
    for spec in specs_by_content_type.get("application/json", []):
        spec_content = spec.read_all_bytes()
        # Do something with the spec content

    # Read the thumbnail
    thumbnail = pkg.thumbnail()
    if thumbnail is not None:
        thumbnail_content = thumbnail.read_all_bytes()
        # Do something with the thumbnail content

    # Read a supplementary file
    supplementary_content = pkg.must_part(
        "/aasx-suppl/some-company/some-manual.pdf"
    ).read_all_bytes()

Please see the full documentation at https://eclipse-aascw.github.io/aas-package3-python/ for more details.

Installation

The library is available on PyPI at https://pypi.org/project/aas-package3/:

pip3 install aas-package3

Versioning

The name of the library indicates the supported version of the Asset Administration Shell (AAS).

In case of aas-package3-python, this means that Version 3 of the Asset Administration Shell (AAS) is supported.

We follow Semantic Versioning to version the library. The version X.Y.Z indicates:

  • X is the major version (backward-incompatible),

  • Y is the minor version (backward-compatible), and

  • Z is the patch version (backward-compatible bug fix).

Contributing

Feature requests or bug reports are always very, very welcome!

Please see quickly if the issue does not already exist in the issue section and, if not, create a new issue.

See CONTRIBUTING.rst for how to set up the development environment and run the checks.

Metadata

Release files for aas-package3 1.0.0rc1

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-package3 1.0.0rc1
File Size Uploaded Provenance Actions
aas_package3-1.0.0rc1.tar.gz 17.3 kB Without provenance Details for aas_package3-1.0.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aas-package3 1.0.0rc1
File Interpreter ABI Platform Actions
aas_package3-1.0.0rc1-py3-none-any.whl Python 3 none any Details for aas_package3-1.0.0rc1-py3-none-any.whl

Total release size: 33.4 kB

Release files / aas_package3-1.0.0rc1.tar.gz

Download URL aas_package3-1.0.0rc1.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
db1d195686107cd9fc2f0c8d0a21ea276c057fbf512474cc208743382ad45877
BLAKE2b-256 checksum
How to use checksums
38c8d75092a4d4cf5f8160495675b7c22e1d72800e4629546d478620e3d7a4e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / aas_package3-1.0.0rc1-py3-none-any.whl

Download URL aas_package3-1.0.0rc1-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8ec3e413e8f0a170725bb73a3fc54c064f3f5556f866137738247f6d4805a9d
BLAKE2b-256 checksum
How to use checksums
c5a5eb55803c5975b0b48d8938b42516bc9cc7796d64a030cfa7eba6a0d4a8a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for aas-package3 1.0.0rc1

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
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