Skip to main content

A Python SDK for Eclipse BaSyx to manage Asset Administration Shells (AAS)

Project description

shellsmith
Test codecov PyPI - Version Ruff

Documentation: https://shellsmith.pages.dev

Shellsmith is a Python SDK for managing Asset Administration Shells (AAS) via the Eclipse BaSyx REST API.

Installation

pip install shellsmith

For CLI and MCP server support, install with optional dependencies:

pip install shellsmith[cli,mcp]

Requires: Python 3.10+

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_id and submodel_id are automatically base64-encoded unless you pass encode=False.

➡️ Full Python API reference: shellsmith.pages.dev/api

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> --help to view subcommands and options.

➡️ Full CLI reference: shellsmith.pages.dev/cli

MCP Integration

Shellsmith provides a Model Context Protocol (MCP) server that enables AI assistants to interact with Asset Administration Shells. The server exposes 25+ tools for comprehensive AAS management through a standardized interface.

Configure with Claude Desktop or other MCP clients to get AI-powered AAS operations.

➡️ Full MCP reference: shellsmith.pages.dev/mcp

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 .env file in your project with:

    SHELLSMITH_BASYX_ENV_HOST=https://your-host:1234
    
  • Use the --host option with any CLI command:

    aas get shells --host https://your-host:1234
    
  • Pass the host parameter in any shellsmith Python function:

    shellsmith.get_shells(host="https://your-host:1234")
    

ℹ️ The --host CLI flag and host= 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

shellsmith-0.5.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shellsmith-0.5.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file shellsmith-0.5.0.tar.gz.

File metadata

  • Download URL: shellsmith-0.5.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for shellsmith-0.5.0.tar.gz
Algorithm Hash digest
SHA256 710dc5d8c4163b6fa53ad48a1ca46cd9ac1eabbe2d51b31897c2bae0e5b8978c
MD5 109a94070cf2040b96c003df1f6b060c
BLAKE2b-256 0ccac6ae1d91b3bea51b396c26ad96a8f7eb6a95b5966fd27b4f43957f3fae50

See more details on using hashes here.

File details

Details for the file shellsmith-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: shellsmith-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for shellsmith-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f052d6e77378c8ad1778cb077ed1b14568a10978beefa08796732f269387ab
MD5 7d3f38f98cb0574522c5214e41c07cec
BLAKE2b-256 a1f06d0a1333650e6281f4603b965238bfcd3cb8f34c895bbe5f797b73d7461c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page