This guide will walk you through installing and using aas-http-client.
📦 Installation
Install via pip:
pip install aas-http-client
Usage
Server Configuration
For detailed configuration options and examples, see the Configuration Guide.
Client
The client communicates directly with the server and uses generic dictionaries (dict) for input and output. The serialization and deserialization of the request and response body must be performed on the runtime side.
📌 Create Client from Configuration File
Create a client from a given configuration file.
from pathlib import Path
from aas_http_client import create_client_by_config
config_file = Path("./server_config.json")
client = create_client_by_config(config_file, basic_auth_password="")
📌 Create Client via Parameters
Create a client from given parameters.
from aas_http_client import create_client_by_url
client = create_client_by_url(
base_url="http://myaasserver:5043/",
basic_auth_username="",
basic_auth_password="",
http_proxy="",
https_proxy="",
time_out=200,
connection_time_out=100,
ssl_verify=True,
trust_env=True
)
📌 Create Client via dictionary
Create a client from given JSON dictionary.
from aas_http_client import create_client_by_dict
configuration_dict = {
"BaseUrl": "http://myaasserver:5043/",
"HttpsProxy": None,
"HttpProxy": None,
"TimeOut": 200,
"ConnectionTimeOut": 100,
"SslVerify": True,
"TrustEnv": True,
"AuthenticationSettings": {
"BasicAuthentication": {
"Username": ""
}
}
}
client = create_client_by_dict(configuration_dict, basic_auth_password="")
Wrapper
The wrapper provides high-level methods using BaSyx Python SDK data models for easier integration.
📌 Create Wrapper from Configuration File
Create a wrapper from a given configuration file.
from pathlib import Path
from aas_http_client.wrapper.sdk_wrapper import create_wrapper_by_config
import basyx.aas.model
config_file = Path("./server_config.json")
wrapper = create_wrapper_by_config(config_file, basic_auth_password="")
📌 Create Wrapper via Parameters
Create a wrapper from given parameters.
from aas_http_client.wrapper.sdk_wrapper import create_wrapper_by_url
import basyx.aas.model
wrapper = create_wrapper_by_url(
base_url="http://myaasserver:5043/",
basic_auth_username="",
basic_auth_password="",
http_proxy="",
https_proxy="",
time_out=200,
connection_time_out=100,
ssl_verify=True,
trust_env=True
)
📌 Create Wrapper via dictionary
Create a wrapper from given JSON dictionary.
from aas_http_client.wrapper.sdk_wrapper import create_wrapper_by_dict
configuration_dict = {
"BaseUrl": "http://myaasserver:5043/",
"HttpsProxy": None,
"HttpProxy": None,
"TimeOut": 200,
"ConnectionTimeOut": 100,
"SslVerify": True,
"TrustEnv": True,
"AuthenticationSettings": {
"BasicAuthentication": {
"Username": ""
}
}
}
wrapper = create_wrapper_by_dict(configuration_dict, basic_auth_password="")
⚠️ Notes
- When
ssl_verify is set to False, SSL/TLS verification is disabled (⚠️ not recommended in production).
- Default timeouts are intentionally high for development; adjust for production usage.
- The client and wrappers support both parameter-based and configuration file-based setup.
- For detailed configuration options, authentication methods, and examples, see the Configuration Guide.