This release is a pre-release and may not be stable for production use.
Eclipse aas-client3.2-python
This is a client to interact with servers of Asset Administration Shells (AAS) over the HTTP/REST API, version 3.2, in Python.
The client works with the types of aas-core3.2, so you can directly send and receive the AAS models you create, verify and de/serialize with it. It implements all the operations of the specification, one function per operation, and does not depend on any particular HTTP library: you bring your own transport, or use the ready-made one based on requests.
Appetizer
Create a submodel in a Submodel Repository, read one of its values, and list all the submodels page by page:
import requests
import aas_core3_2.types as aas_types
from aas_client3_2 import http
from aas_client3_2 import pagination
from aas_client3_2 import requests_transport
from aas_client3_2 import submodel_repository
server = http.Server(
transport=requests_transport.RequestsTransport(requests.Session()),
base_url="http://localhost:5005",
)
submodel = aas_types.Submodel(
id="https://example.com/ids/sm/appetizer",
id_short="Appetizer",
submodel_elements=[
aas_types.Property(
id_short="MaxRotationSpeed",
value_type=aas_types.DataTypeDefXSD.INT,
value="5000",
)
],
)
submodel_repository.post_submodel(server, submodel)
print(
submodel_repository.get_submodel_element_by_path_value_only(
server, submodel.id, "MaxRotationSpeed"
)
)
# Prints: 5000.0
for a_submodel in pagination.iterate(
lambda cursor: submodel_repository.get_all_submodels(server, cursor=cursor)
):
print(a_submodel.id)
Installation
Install the client together with the ready-made transport:
pip3 install aas-client3.2[requests]
To check servers against the specification, also install the testing client, aas-testing-client3.2, which mirrors the client with contracts on the requests and the responses.
Documentation
The documentation is available on: https://eclipse-aascw.github.io/aas-client3.2-python/
Getting started: the installation, a tutorial which creates and changes a shell with its submodels, and the errors, the pagination, the files, the transports and the authentication with OAuth 2 and OIDC,
Modules: a chapter with examples for every API, such as the repositories, the registries and the discovery,
API reference: all the functions, generated from the source code, and
Design: the architecture and the design decisions.
Specification
The client is based on the OpenAPI definitions of the HTTP/REST API from the Specification of the Asset Administration Shell, Part 2: API (IDTA-01002) version 3.2, available in admin-shell-io/aas-specs-api at v3.2.0. In particular:
Entire-API-Collection/V3.2.yaml – all the API operations in one file, and
Part2-API-Schemas/openapi.yaml – the payload schemas.
Contributing
If you want to contribute, see our contributing guide.
Metadata
Release files for aas-client3.2 1.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aas_client3_2-1.0.0rc1.tar.gz | 500.7 kB | Without provenance | Details for aas_client3_2-1.0.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aas_client3_2-1.0.0rc1-py3-none-any.whl | Python 3 | none | any | Details for aas_client3_2-1.0.0rc1-py3-none-any.whl |
Total release size: 611.1 kB
Release files / aas_client3_2-1.0.0rc1.tar.gz
| Download URL | aas_client3_2-1.0.0rc1.tar.gz |
|---|---|
| Size | 500.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5424f79cfe4c190ecac1c81599013b86a9974246389f0a5299c537071e24147
|
|
BLAKE2b-256 checksum How to use checksums |
b72cc871cb0943d305ed4942b67a0b2e56e303bceb6f8cc3540f0743b1bf33ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / aas_client3_2-1.0.0rc1-py3-none-any.whl
| Download URL | aas_client3_2-1.0.0rc1-py3-none-any.whl |
|---|---|
| Size | 110.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d42e100064d76bb28bcfdf58a6b0ada949c3a915ff053f2645f7901750e5d64
|
|
BLAKE2b-256 checksum How to use checksums |
30b27c44d1dc2a10ac7f996b5656e9bebf3fa06b2fdbb9a211e2a20a0119d303
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Security for aas-client3.2 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.