Metadata-Version: 2.4
Name: aas-http-client
Version: 1.0.3
Summary: Generic Python HTTP client for communication with various types of AAS servers.
Author-email: Daniel Klein <daniel.klein@em.ag>
License: MIT License
        
        Copyright (c) 2025 Fluid4.0
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/fluid40/aas-http-client
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.12.5
Requires-Dist: requests>=2.32.5
Requires-Dist: basyx-python-sdk>=2.0.0
Requires-Dist: puremagic>=1.30
Requires-Dist: types-requests>=2.32.4.20260107
Dynamic: license-file

<!-- TODO: Go through the readme and enter the information here -->

# AAS HTTP Client

<div align="center">
<!-- change this to your projects logo if you have on.
  If you don't have one it might be worth trying chatgpt dall-e to create one for you...
 -->
<img src="docs/assets/fluid_logo.svg" alt="aas_http_client" width=500 />
</div>

---

[![License: MIT](https://img.shields.io/badge/license-MIT-%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.

Version 1.0.0 includes implementations for all endpoints from BaSxy Java SDK 'aas-registry', 'submodel-registry' and 'aas-environment'.

---

## Supported Servers

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)

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

📜 [MIT 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())
```
