Metadata-Version: 2.4
Name: aas-http-client
Version: 0.7.0
Summary: Generic python HTTP client for communication with various types of AAS servers
Author-email: Daniel Klein <daniel.klein@em.ag>
License: # :em engineering methods AG Software License
        
        SPDX-Identifier: LicenseRef-em
        Date: 2025
        Version: v0.1
        
        This license agreement (“Agreement”) is made between **:em engineering methods AG (“:em AG”)**, a company
        incorporated under the laws of Germany, and the **customer (“Customer”)** who has purchased or obtained
        software, scripts, source code or software components (“Software”) from :em AG.
        
        By installing, copying, or otherwise using the Software, the Customer agrees to be bound by the terms of this
        Agreement. If the Customer does not agree to the terms of this Agreement, the Customer must not use the
        Software and must delete or return any copies of the Software to :em AG.
        
        ## 1. Grant of License
        
        Subject to the terms and conditions of this Agreement, :em AG grants the Customer a non-exclusive,
        non-transferable, revocable license to use the Software solely for the Customer’s own internal business
        purposes on systems owned or controlled by the Customer (“Customer Systems”). The Customer may also allow
        its service providers to use the Software on Customer Systems, provided that such service providers agree
         to comply with the terms of this Agreement and the Customer remains responsible for their actions.
        
        The Customer may not:
        
        * sublicense, sell, rent, lease, lend, distribute, or otherwise transfer the Software or any rights under
          this Agreement to any third party without the prior written consent of :em AG;
        * modify, adapt, translate, reverse engineer, decompile, disassemble, or create derivative works based
          on the Software or any part thereof;
        * remove, alter, or obscure any copyright notices or other proprietary notices on the Software;
          use the Software for any illegal, unethical, or unauthorized purpose;
        * use the Software in a manner that infringes or violates the rights of :em AG or any third party.
        
        ## 2. Reservation of Rights
        
        :em AG retains all right, title, and interest in and to the Software and any copies thereof.
        The Software is protected by copyright and other intellectual property laws and treaties.
        The Software is licensed, not sold. Nothing in this Agreement shall be construed as transferring any
        ownership rights in the Software to the Customer.
        
        :em AG reserves the right to use the Software for any purpose, including but not limited to providing it to
        other customers of :em AG, changing its license terms for future versions, or discontinuing its development
        or support.
        
        ## 3. Disclaimer of Warranty
        
        The Software is provided “as is” without any warranty of any kind, either express or implied, including but
        not limited to the implied warranties of merchantability, fitness for a particular purpose, or
        non-infringement.
        
        :em AG does not warrant that the Software will meet the Customer’s requirements, that it will operate
        uninterrupted or error-free, that it will be compatible with any other software or hardware, or that it will
        be free from defects or viruses.
        
        The Customer acknowledges that it has relied on its own skill and judgment in selecting and using the Software
        and that it is solely responsible for the results obtained from the Software.
        
        ## 4. Limitation of Liability
        
        To the maximum extent permitted by applicable law, in no event shall :em AG be liable for any direct,
        indirect, incidental, special, consequential, or exemplary damages arising out of or in connection with this
        Agreement or the use or inability to use the Software, even if :em AG has been advised of the possibility of
        such damages. In any case, :em AG’s total liability under this Agreement shall not exceed the amount paid by
        the Customer for the Software.
        
        ## 5. Termination
        
        This Agreement shall remain in effect until terminated by either party. The Customer may terminate this
        Agreement at any time by ceasing to use the Software and deleting or returning all copies of the Software
        to :em AG. :em AG may terminate this Agreement at any time if the Customer breaches any term of this
        Agreement.
        
        Upon termination of this Agreement for any reason, all rights and licenses granted to the Customer under
        this Agreement shall cease and the Customer shall destroy or return all copies of the Software to :em AG.
        
        ## 6. General
        
        This Agreement constitutes the entire agreement between the parties with respect to the subject matter hereof
        and supersedes all prior or contemporaneous agreements or understandings, whether written or oral. This
        Agreement may not be modified or amended except by a written instrument signed by both parties.
        
        This Agreement shall be governed by and construed in accordance with the laws of Germany without regard to its
        conflict of laws principles. Any dispute arising out of or relating to this Agreement shall be submitted to
        the exclusive jurisdiction of the competent courts of Munich, Germany.
        
        If any provision of this Agreement is held to be invalid, illegal, or unenforceable, the remaining provisions
        shall remain in full force and effect.
        
        The failure of either party to enforce any right or provision of this Agreement shall not constitute a waiver
        of such right or provision.
        
        The Customer may not assign or transfer this Agreement or any rights or obligations under this Agreement
        without the prior written consent of :em AG. :em AG may assign or transfer this Agreement or any rights
        or obligations under this Agreement without the consent of the Customer.
        
        The Customer agrees to comply with all applicable laws and regulations in connection with its use of the
        Software, including but not limited to export control laws and data protection laws.
        
        The Customer acknowledges that it has read and understood this Agreement and agrees to be bound by its terms
        and conditions. The Customer also agrees that this Agreement is the complete and exclusive statement of the
        agreement between the parties and supersedes any proposal or prior agreement, oral or written, and any other
        communications between the parties relating to the subject matter of this Agreement.
        
Project-URL: Homepage, https://github.com/fluid40/aas-http-client
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typing>=3.7.4.3
Requires-Dist: pydantic>=2.11.5
Requires-Dist: requests>=2.32.3
Requires-Dist: basyx-python-sdk>=2.0.0
Requires-Dist: python-magic>=0.4.27
Requires-Dist: python-json-logger>=3.3.0
Dynamic: license-file

# AAS HTTP Client

aas_http_client

---

[![License: em](https://img.shields.io/badge/license-emSL-%23f8a602?label=License&labelColor=%23992b2e)](LICENSE)
[![CI](https://github.com/fluid40/aas-http-client/actions/workflows/CI.yml/badge.svg?branch=main&cache-bust=1)](https://github.com/fluid40/aas-http-client/actions)
[![PyPI version](https://img.shields.io/pypi/v/aas-http-client.svg)](https://pypi.org/project/aas-http-client/)

AAS HTTP Client is a flexible Python library for interacting with Asset Administration Shell (AAS) and submodel repository servers over HTTP. It uses standard Python dictionaries for function inputs and outputs, making it easy to integrate with a variety of workflows. The client implements the most widely used endpoints defined in the [AAS server specification](https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.1.1/specification/interfaces.html), ensuring compatibility with multiple AAS repository server implementations. This allows you to connect to different AAS servers without changing your client code.

> **Note:** Each client instance is designed to communicate with a single AAS server at a time (1-to-1 mapping). To interact with multiple servers, create a separate client instance for each server.

Tested servers include:
- [Eclipse BaSyx .Net SDK server (Fluid4.0 Fork)](https://github.com/fluid40/basyx-dotnet)
- [Eclipse BaSyx Java SDK server](https://github.com/eclipse-basyx/basyx-java-sdk)
- [Eclipse BaSyx Python SDK server](https://github.com/eclipse-basyx/basyx-python-sdk)
- [Eclipse AASX server](https://github.com/eclipse-aaspe)

The actual behavior of the client may vary depending on the specific server implementation and its level of compliance with the [AAS specification](https://industrialdigitaltwin.org/en/content-hub/aasspecifications). Supported endpoints and features depend on what each server provides.

In addition to the core HTTP client, this library offers wrapper modules for popular AAS frameworks. These wrappers use the HTTP client as middleware and expose SDK-specific data model classes for input and output, making integration with those frameworks seamless.

Currently available wrappers:
- [Eclipse BaSyx Python SDK](https://github.com/eclipse-basyx/basyx-python-sdk)

The AAS HTTP Client package also include some utility functions for for recurring tasks (provided by import 'aas_http_client.utilities'):
- encoder: base64 encoding and decoding
- sdk_tools: e.g. Framework object serialization and deserialization, basic submodel operations
- model_builder: creation of some basic AAS model elements

## Documentation

🚀 [Getting Started](docs/getting_started.md)

🛠️ [Configuration](docs/configuration.md)

📝 [Changelog](CHANGELOG.md)

## Resources

🤖 [Releases](http://github.com/fluid40/aas-http-client/releases)

📦 [Pypi Packages](https://pypi.org/project/aas-http-client/)

📜 [em AG Software License](LICENSE)

## ⚡ Quickstart

For a detailed introduction, please read [Getting Started](docs/getting_started.md).

```bash
pip install aas-http-client
````

### Client

```python
from aas_http_client import create_client_by_url

client = create_client_by_url(
    base_url="http://myaasserver:5043/"
)

print(client.shell.get_shells())
```

### BaSyx Python SDK Wrapper

```python
from aas_http_client.wrapper.sdk_wrapper import create_wrapper_by_url

wrapper = create_wrapper_by_url(
    base_url="http://myaasserver:5043/"
)

print(wrapper.get_shells())
```
