The `autosar-data` library provides tools to read, write, and modify AUTOSAR ARXML data using Python. It offers an object-oriented API for interacting with AUTOSAR workspaces, packages, and elements, simplifying development with ARXML files. The current version is 0.15.0, and it follows an infrequent but impactful release cadence, often introducing breaking changes related to API and Python version support between minor versions.
pip install autosar-dataVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create an empty AUTOSAR workspace, add a package structure, create container and text elements, and then print the resulting ARXML content to a string. It also includes an example of how to load an ARXML file and access its content, highlighting the return value change for loading methods.
Upgrade your Python environment to version 3.11 or higher. If you need to use Python 3.9/3.10, pin `autosar-data` to a version older than 0.15.0 (e.g., `pip install autosar-data<0.15`).
Update your code to unpack the returned tuple: `workspace, errors = Workspace.from_file('file.arxml')`. Remember to check the `errors` list for parsing issues.Replace `AutosarData.parse_string(...)` with `AutosarData.from_string(...)`. Note that `from_string` also returns a `(workspace, errors)` tuple.
Always ensure your input ARXML files are well-formed XML and conform to the expected AUTOSAR schema. Use XML validation tools if encountering persistent parsing issues.
No dependency data recorded yet.