A Python library for managing and loading class instances from modules and YAML configurations.
Project description
spx-sdk
spx-sdk is a Python library designed as a foundation for building and extending physics-based simulation models of hardware devices within the SPX environment. It provides tools and abstractions to define and compose simulation components, configure simulation workflows, and integrate virtual prototypes seamlessly into your product development lifecycle and CI/CD pipelines.
Features
- Modular Components: Easily define and combine device models and subcomponents.
- Configurable Workflows: Customize simulation parameters, scenarios, and execution order.
- CI/CD Integration: Automate simulation runs as part of your build and testing pipelines.
- Extensible Architecture: Extend core classes to support custom hardware models and simulation logic.
Installation
Install via pip:
pip install spx-sdk
Getting Started
from spx_sdk.components import SpxComponent, SpxContainer
from spx_sdk.registry import register_class
# Register a custom component
@register_class(name="info")
class InfoComponent(SpxComponent):
def _populate(self, parameters):
self.info = None
def run(self, *args, **kwargs):
print(self.info)
yaml_data = '''
info:
info: "Hello World!"
'''
# Parse JSON and build the container
data = json.loads(yaml_data)
instance = SpxContainer(
name='Root',
definition=data,
parent=None
)
# Run the simulation
sim.run()
For full documentation, examples, and advanced configuration, visit the project docs.
Project details
Release history Release notifications | RSS feed
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 spx_sdk-0.2.2.tar.gz.
File metadata
- Download URL: spx_sdk-0.2.2.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
759d07220cff58509d44e1bd78c25739c1cecf593a78361284fa52aed369ecaf
|
|
| MD5 |
720d0d8ece5fbd20c9cf408ce5e85d01
|
|
| BLAKE2b-256 |
b462bade72b7003c0d4c681882f48f17e3b9149a026f99fd0676500401779db6
|
File details
Details for the file spx_sdk-0.2.2-py3-none-any.whl.
File metadata
- Download URL: spx_sdk-0.2.2-py3-none-any.whl
- Upload date:
- Size: 34.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e36ccacd06a1e409401fedea06d01173b78232a6d6a3cc1280861dc949242a63
|
|
| MD5 |
47af5f8171925aa67551f54e642c0412
|
|
| BLAKE2b-256 |
cc2c635db57c0b7e01b860440d63d5a6ad0c0c09a9f9360d4dabada06c247d9a
|