A Python SDK and CLI for Eclipse BaSyx to manage Asset Administration Shells (AAS)
Project description
Documentation: https://shellsmith.pages.dev
Shellsmith is a Python SDK and CLI for managing Asset Administration Shells (AAS), Submodels, and Submodel Elements via the Eclipse BaSyx REST API.
It provides full client-side access to AAS resources with a clean Python interface and a powerful typer-based CLI — ideal for scripting, automation, and digital twin integration workflows.
Features
- 🐍 Python SDK for full CRUD access to Shells, Submodels, and Submodel Elements
- ⚡ CLI tool powered by Typer for fast scripting and automation
- ⚙️ Simple
.env-based configuration for flexible environment switching - 🔁 Seamless integration with the Eclipse BaSyx Environment REST API
🚀 Installation
pip install shellsmith
Requires: Python 3.10+
🧠 CLI Usage
Shellsmith provides a powerful command-line interface:
aas --help
| Command | Description |
|---|---|
info |
Display the current Shell tree and identify issues. |
upload |
Upload a single AAS file or all AAS files from a folder. |
nuke |
☢️ Delete all Shells and Submodels (irrevocable). |
encode |
Encode a value (e.g. Shell ID) to Base64. |
decode |
Decode a Base64-encoded value. |
get |
Get Shells, Submodels, and Submodel Elements. |
delete |
Delete Shells, Submodels, or Submodel Elements. |
update |
Update Shells, Submodels, or Submodel Elements. |
create |
Create new Shells, Submodels, or Submodel Elements. |
ℹ️ Run
aas <command> --helpto view subcommands and options.
➡️ Full CLI reference: shellsmith.pages.dev/cli
🐍 Python API Usage
You can also use shellsmith as a Python client library to interact with the BaSyx Environment REST API.
import shellsmith
# Fetch all AAS Shells
shells = shellsmith.get_shells()
# Fetch a specific Submodel
submodel = shellsmith.get_submodel("https://example.com/submodels/my-submodel")
# Read and update a Submodel Element's value
value = shellsmith.get_submodel_element_value(submodel["id"], "temperature")
shellsmith.patch_submodel_element_value(submodel["id"], "temperature", "42.0")
ℹ️
shell_idandsubmodel_idare automatically base64-encoded unless you passencode=False.
➡️ Full Python API reference: shellsmith.pages.dev/api
🔧 Configuration
The default AAS environment host is:
http://localhost:8081
You can override it in several ways:
-
Set the environment variable:
SHELLSMITH_BASYX_ENV_HOST=https://your-host:1234
-
Create a
.envfile in your project with:SHELLSMITH_BASYX_ENV_HOST=https://your-host:1234
-
Use the
--hostoption with any CLI command:aas get shells --host https://your-host:1234
-
Pass the
hostparameter in anyshellsmithPython function:shellsmith.get_shells(host="https://your-host:1234")
💡 The
--hostCLI flag andhost=Python argument take precedence over environment variables and.env.
🤝 Contributing
We welcome contributions!
See the Contributing Guide for setup, testing, and coding standards.
Resources
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shellsmith-0.4.0.tar.gz.
File metadata
- Download URL: shellsmith-0.4.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
101f3c4daab741eb8d045fb8d92211b4a60e8f3796951de00bb7074122467475
|
|
| MD5 |
c2ee078a0df7d4a24ac98819978648eb
|
|
| BLAKE2b-256 |
fdd7e542c5951ef54f28bcd29e55c21b336eef1f77620c43752342a0736c15a9
|
File details
Details for the file shellsmith-0.4.0-py3-none-any.whl.
File metadata
- Download URL: shellsmith-0.4.0-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e08f6ea8f7e5eaebdf98f6719c876ecbe7cc794599d4863c1d13b9cc69eaf1d
|
|
| MD5 |
889f9c108a672ffa7bbb07fc31122627
|
|
| BLAKE2b-256 |
fcefd23544b6ad41252a6308561ebbd5ef05d1ea426008795daa4b5accc5818e
|