Mastapy is the Python scripting API for MASTA.
- Website: https://www.smartmt.com/
- Support: https://support.smartmt.com/
- Documentation: https://documentation.smartmt.com/MastaAPI/16.0/
Features
- Powerful integration with MASTA with the ability to run Python scripts from the MASTA interface directly.
- Ability to use MASTA functionality external to the MASTA software in an independent script.
- An up-to-date and tight integration with Python. This is not a lightweight wrapper around the C# API. It is specifically designed for Python and works great in tandem with other common scientific Python packages (e.g. SciPy, NumPy, Pandas, Matplotlib, Seaborn, etc.)
- Extensive backwards compatibility support. Scripts written in older versions of mastapy will still work with new versions of MASTA.
- Full support for Linux and .NET 8.0 versions of the MASTA API.
Command-Line Plugins
The following optional command-line plugins can be installed alongside mastapy as extras.
- cli-regression: Compares results across multiple versions of MASTA.
Install these extras using the following syntax:
pip install mastapy[cli-regression]
Release Information
Major Changes
- Adds support for a command-line regression plugin. See the package for more details.
Minor Changes
TaskProgressobjects can now be created and used via theTaskProgress.createmethod.TaskProgresscan now have its events subscribed to.- Overridable properties (e.g.
design.node_size) now haveas_overriddenandas_calculatedproperties on them. These make it easier to swap between the two values. See the examples of the properties for more information. - Various improvements and bug fixes.
Using TaskProgress
To create a TaskProgress object, use the TaskProgress.create method.
from mastapy import TaskProgress
task_progress = TaskProgress.create(None, "My progress")
Its events can then be subscribed to.
def status_updated(value: str) -> None:
print(f"Status was updated: {value}")
def incremented(value: float) -> None:
print(f"Progress was incremented: {value}")
task_progress.add_status_updated(status_updated)
task_progress.add_progress_incremented(incremented)
Your task progress object can then be passed into any *_with_progress function.
from mastapy import Examples
design = Examples.Automotive.SCOOTER_GEARBOX.load()
design.save_with_progress("path/to/file.masta", False, task_progress)
Release files for mastapy 16.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mastapy-16.0.0.tar.gz | 5.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mastapy-16.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 MB
Release files / mastapy-16.0.0.tar.gz
| Download URL | mastapy-16.0.0.tar.gz |
|---|---|
| Size | 5.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce33d8181e4c76bb3e820a7fc1e4b69ec8981077a1637a0098197972e58c4740
|
|
BLAKE2b-256 checksum How to use checksums |
6671d9a60162cce6208445716572c328bddea0c7e9321706fd30d546033e1073
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mastapy-16.0.0-py3-none-any.whl
| Download URL | mastapy-16.0.0-py3-none-any.whl |
|---|---|
| Size | 16.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de4626ba3c57f44e5f8c88e9877936237d1829150fc7fc80d8d2bd3cec227442
|
|
BLAKE2b-256 checksum How to use checksums |
94d23d472c1d4fa65303c18ba3e3ba82bc2d836feefa8bb0e5efbfbf753e46b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|