Skip to main content
PyMechanical logo

PyAnsys PyPI Python GH-CI Codecov MIT Ruff pre-commit Ask DeepWiki

Overview

PyMechanical is a Python interface for Ansys Mechanical (FEA software for structural engineering), enabling automation and integration of simulation workflows from 2024 R2 and later.

PyMechanical provides two distinct modes of interaction:

  • Embedding mode — Run Mechanical directly in your Python process via the App class. Full object-model access, fast startup, ideal for Jupyter notebooks and interactive scripting.

  • Remote session mode — Launch Mechanical as a separate server process and communicate via gRPC. Process isolation, optional GUI, ideal for CI/CD, Docker, and automation.

Compatibility

  • Python: 3.12 - 3.14

  • Mechanical: 2024 R2 (v242) and later

  • Platforms: Windows, Linux

Installation

Install from PyPI:

pip install ansys-mechanical-core

For graphics support:

pip install ansys-mechanical-core[graphics]

For RPC functionality:

pip install ansys-mechanical-core[rpc]

For AI assistant integration via the Model Context Protocol (MCP):

pip install ansys-mechanical-core[mcp]

Requirements:

  • Licensed copy of Ansys Mechanical (2024 R2 or later).

  • For embedded mode: Local Mechanical installation required.

  • For remote session mode: Network access to a running Mechanical instance.

Quick start

Embedding mode:

from ansys.mechanical.core import App

app = App(globals=globals())
print(app)

# Access Mechanical objects directly
Model.AddStaticStructuralAnalysis()

Remote session mode:

from ansys.mechanical.core import launch_mechanical

mechanical = launch_mechanical()
result = mechanical.run_python_script("2+3")
print(result)  # Output: 5
mechanical.exit()

Connect to existing instance:

from ansys.mechanical.core import connect_to_mechanical

mechanical = connect_to_mechanical(port=10000)
result = mechanical.run_python_script("Model.Name")
print(result)

Troubleshooting

  • Connection refused: Ensure Mechanical is running and the port is accessible.

  • License error: Verify your Ansys license is properly configured.

  • Import error: Check that ansys-pythonnet is installed (not pythonnet).

  • Linux embedding: Use mechanical-env to run Python scripts for embedded mode.

Documentation and support

Metadata

Release files for ansys-mechanical-core 0.13.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ansys-mechanical-core 0.13.5
File Size Uploaded Provenance Actions
ansys_mechanical_core-0.13.5.tar.gz 108.4 kB With provenance Details for ansys_mechanical_core-0.13.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ansys-mechanical-core 0.13.5
File Interpreter ABI Platform Actions
ansys_mechanical_core-0.13.5-py3-none-any.whl Python 3 none any Details for ansys_mechanical_core-0.13.5-py3-none-any.whl

Total release size: 274.6 kB

Release files / ansys_mechanical_core-0.13.5.tar.gz

Download URL ansys_mechanical_core-0.13.5.tar.gz
Size 108.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c55c9387217334d890fb61a05b8d6557449ecbbad32a3be4c7eb34bb345517dd
BLAKE2b-256 checksum
How to use checksums
9968ba081b8fd2ee7b04cc72a390c64cdc50101ff7984c24fa7002a52173bafe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / ansys_mechanical_core-0.13.5-py3-none-any.whl

Download URL ansys_mechanical_core-0.13.5-py3-none-any.whl
Size 166.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdc2d02c7f8c5ca1dd361a79bbd2b2f5abfe68b520dfd0f36ad155dbbe4356ed
BLAKE2b-256 checksum
How to use checksums
2311c85f51994ec72c4afa2c2d5f8c2d4d042687867fdbe253649dcf6bbfbf9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for ansys-mechanical-core 0.13.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ansys_mechanical_core-0.13.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.13.5 This release

2 release files Full provenance

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