Skip to main content

SMT
Mastapy


uv Ruff License: MIT Python

Mastapy is the Python scripting API for MASTA.

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.

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

  • TaskProgress objects can now be created and used via the TaskProgress.create method.
  • TaskProgress can now have its events subscribed to.
  • Overridable properties (e.g. design.node_size) now have as_overridden and as_calculated properties 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)

Source distribution for mastapy 16.0.0
File Size Uploaded
mastapy-16.0.0.tar.gz 5.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mastapy 16.0.0
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

This release

16.0.0 This release

2 release files

15.1.7

2 release files

15.1.6

2 release files

15.1.5

2 release files

15.1.4

2 release files

15.1.2

2 release files

15.1.1

2 release files

15.0.1

2 release files

14.1.4

2 release files

14.1.3

2 release files

14.1.0

2 release files

14.0.3

2 release files

14.0.2

2 release files

14.0.1

2 release files

14.0.0

2 release files

13.0.2

2 release files

13.0.1

2 release files

13.0.0

2 release files

12.0.6

2 release files

12.0.5

2 release files

12.0.4

2 release files

12.0.3

2 release files

12.0.1

2 release files

12.0

2 release files

11.1.2

2 release files

11.1.1

2 release files

11.1

2 release files

11.0.2

2 release files

11.0.1

2 release files

11.0

2 release files

10.2.3

2 release files

10.2.2

2 release files

10.2.1

2 release files

10.2

2 release files

10.1.2

2 release files

10.1.1

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page