Registry / serialization / ansys-api-platform-instancemanagement

ansys-api-platform-instancemanagement

JSON →
library1.1.3pypypiunverified

This library provides the autogenerated Python gRPC interface for the Ansys Platform Instance Management service. It allows Python applications to interact with the Ansys Platform to manage instances of Ansys products and services. The current version is 1.1.3, and it follows a release cadence tied to updates in the underlying gRPC API definition.

pip install ansys-api-platform-instancemanagement
INSTALL
IMPORT
SIG · ANSYS-API-PLATFORM
A
ansys-api-platform-instancemanagement
serializationpythonv1.1.3
Install
3.0s avg
Import
Disk
37MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.3 · 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
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 40.1MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.0s · import 0.000s · 38MB
37MB installed
● package 37MB
Code
Verified usage

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

instance_management_pb2
from ansys.api.platform.instancemanagement.v1 import instance_management_pb2
from ansys.api.platform.instancemanagement.v1 import instance_management_pb2

This quickstart demonstrates how to establish an insecure gRPC connection to a local Ansys Platform Instance Management service endpoint and call the `ListInstances` method. For production environments, secure channels (e.g., `grpc.secure_channel`) and robust authentication (e.g., API keys, JWT tokens via call credentials) are mandatory. The `GRPC_TARGET` can be configured via an environment variable.

import grpc import os from ansys.api.platform.instancemanagement.v1 import instance_management_pb2_grpc from ansys.api.platform.instancemanagement.v1 import instance_management_pb2 # For local testing without authentication # For production, use secure channels and proper authentication (e.g., API key, JWT). # Example with an insecure channel, replace with your gRPC endpoint. GRPC_TARGET = os.environ.get('ANSYS_PLATFORM_GRPC_TARGET', 'localhost:50051') try: # Establish a gRPC channel channel = grpc.insecure_channel(GRPC_TARGET) # Create a gRPC client stub client = instance_management_pb2_grpc.InstanceManagementServiceStub(channel) # Call a sample method (e.g., ListInstances) # Note: This operation might require specific permissions or an actual running service # that supports insecure connections or has no instances to list. request = instance_management_pb2.ListInstancesRequest() response = client.ListInstances(request) print(f"Successfully called ListInstances. Found {len(response.instances)} instances.") for instance in response.instances: print(f" - Instance ID: {instance.id}, Name: {instance.name}, State: {instance.state}") except grpc.RpcError as e: print(f"gRPC Error: {e.code()} - {e.details()}") except Exception as e: print(f"An unexpected error occurred: {e}") finally: if 'channel' in locals() and channel: channel.close()
Debug
Known issues
gotchaDirect modification of the generated `_pb2` and `_pb2_grpc` files is strongly discouraged. Any changes will be overwritten in subsequent updates or regeneration processes, leading to unexpected behavior.
fix
Interact with the gRPC API solely through the provided Python client stub and message classes without modifying their source files.
affects: All versions
breakingThe `protobuf` library dependency was updated in v1.1.0 to require `protobuf>=3.19,<6`. If you have an older `protobuf` version (e.g., <3.19) installed, it might cause compatibility issues or `TypeError` exceptions during message serialization/deserialization.
fix
Ensure your `protobuf` version is within the specified range by running `pip install --upgrade protobuf` or installing a compatible version alongside `ansys-api-platform-instancemanagement`.
affects: >=1.1.0
gotchaUsing `grpc.insecure_channel` is suitable only for local development or trusted network environments. Production deployments require secure channels (`grpc.secure_channel`) with appropriate TLS/SSL certificates and often API-key or token-based authentication.
fix
For production, use `grpc.secure_channel` and provide `grpc.ssl_channel_credentials()` along with `grpc.access_token_call_credentials()` or other `grpc.composite_call_credentials()` as required by your Ansys Platform setup.
affects: All versions
Upgrade
Version history
1.1.3latest on PyPI · released Apr 11, 2025
Audit
Dependencies
grpciorequiredRequired for gRPC communication.
protobufrequiredRequired for protobuf message serialization/deserialization.
Agent activity
57 hits · last 30 days
node
50
Amazon
1
OpenAI (training)
1
Resources
ansys-api-platform-instancemanagement — pip install ansys-api-platform-instancemanagement · libregistry