Registry / devops / ansys-tools-common

ansys-tools-common

JSON →
library0.5.0pypypiunverified

Ansys Common Tools is a Python library providing a set of utilities and helper functions designed for use across various PyAnsys libraries. It includes tools for certificate management, file downloads, error handling, gRPC server launching, miscellaneous helpers, and versioning. The current version is 0.5.0, and it follows a regular, feature-driven release cadence.

pip install ansys-tools-common
INSTALL
IMPORT
SIG · ANSYS-TOOLS-COMMON
A
ansys-tools-common
devopspythonv0.5.0
Install
2.4s avg
Import
Disk
21MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 2.49s
py 3.11
✓ —
✓ 2.49s
py 3.12
✓ —
✓ 2.24s
py 3.13
✓ —
✓ 2.23s
py 3.9
✕ build_error
✕ build_error
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

generate_self_signed_certificates
from ansys.tools.common.certs import generate_self_signed_certificates
from ansys.tools.common.certs import generate_self_signed_certificates

This quickstart demonstrates how to use the `AnsysNotification` class (introduced in v0.5.0) and the `download_file` utility. Ensure your logging is configured to view notifications. For the download example, a placeholder URL is used; replace it with a valid URL for testing actual file downloads.

import logging import tempfile import os from ansys.tools.common.misc import AnsysNotification # Configure logging to see AnsysNotification messages logging.basicConfig(level=logging.INFO, format='%(levelname)s:%(name)s:%(message)s') # Example 1: Using AnsysNotification (new in v0.5.0) notification = AnsysNotification( title="Example Message", message="This is a test notification from ansys-tools-common.", tag="INFO" ) notification.display() # Example 2: Downloading a file # Note: This is a placeholder for a real download URL example_url = os.environ.get('EXAMPLE_DOWNLOAD_URL', 'https://www.ansys.com/static/assets/ansys-logo-full-color.svg') if example_url == 'https://www.ansys.com/static/assets/ansys-logo-full-color.svg': print("Using placeholder URL. Provide a real URL for full functionality.") with tempfile.TemporaryDirectory() as tmpdir: from ansys.tools.common.downloads import download_file downloaded_path = download_file(url=example_url, directory=tmpdir) print(f"File downloaded to: {downloaded_path}")
Debug
Known issues
gotchaAnsysNotification utilizes Python's standard logging module. If you don't see notifications, ensure you have configured a logger to display messages at or above the notification's severity level (e.g., `logging.basicConfig(level=logging.INFO)`).
fix
Add `logging.basicConfig(level=logging.INFO)` at the start of your script or configure your logging system appropriately before displaying notifications.
affects: >=0.5.0
gotchaThe library is organized into distinct submodules (e.g., `certs`, `downloads`, `launcher`). You must import specific classes or functions from their respective submodules, not directly from the top-level `ansys.tools.common` package.
fix
Always use fully qualified imports like `from ansys.tools.common.misc import AnsysNotification` instead of `from ansys.tools.common import AnsysNotification`.
affects: All
gotchaSome functionalities, like the gRPC server launcher, require optional dependencies (`grpcio`, `grpcio-tools`). Attempting to use these features without installing the `[launcher]` extra will result in a `ModuleNotFoundError`.
fix
Install the library with the necessary extras: `pip install ansys-tools-common[launcher]`.
affects: All
breakingPython version compatibility has been narrowed. `ansys-tools-common` now requires Python 3.10 or newer, and is not compatible with Python 4.x (if/when it exists).
fix
Ensure your Python environment is running version 3.10 or later and less than 4.0.
affects: >=0.4.0 (check specific version changes, 3.10+ requirement is stated for 0.5.0)
Upgrade
Version history
0.5.0latest on PyPI · released Mar 17, 2026
Audit
Dependencies
grpciooptionalRequired for gRPC launcher functionality.
grpcio-toolsoptionalRequired for gRPC launcher functionality.
Agent activity
37 hits · last 30 days
node
34
OpenAI (training)
1
Resources