Skip to main content

PySpeos library

PyAnsys Python PyPI Codecov nightly MIT Ruff

Project overview

PySpeos is a Python library that gathers functionalities and tools based on remote API provided by gRPC server of Ansys software Speos .

Installation

Installation can be done using the published package or the repository sources.

Package

This repository is deployed as the Python packages ansys-speos-core. As usual, installation is done by running:

pip install ansys-speos-core

Sources

Prerequisite: user needs to have a GitHub account and a valid Personal Access Token (see GitHub Settings/Developer settings/Personal access tokens/Generate new token).

Clone and install

git clone https://github.com/ansys/pyspeos.git
cd pyspeos
python -m pip install --upgrade pip
pip install -U pip tox
tox -e style
pip install -e .

Functionalities

All sources are located in src/ folder.

from ansys.speos.core.speos import Speos

speos = Speos()

Documentation and issues

Documentation for the latest stable release of PySpeos is hosted at PySpeos Documentation.

In the upper right corner of the documentation’s title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions.

On the PySpeos Issues page, you can create issues to report bugs and request new features. On the PySpeos Discussions page or the Discussions page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email pyansys.core@ansys.com.

The documentation sources are stored in doc folder and generated using Sphinx. To build it manually :

pip install -U pip tox
pip install .[graphics] --group doc
tox -e doc && your_browser_name .tox/doc_out/index.html

Testing

Tests and assets are in tests and tests/assets folder. Running PySpeos tests requires a running SpeosRPC server. A configuration file allows to choose between a local server and a Docker server (by default).

Test configuration file

The configuration file tests/local_config.json located in tests folder contains several parameters that can be changed according to your needs, for example:

  • SpeosServerOnDocker (Boolean): Speos server launched in a Docker container.

  • SpeosServerPort (integer): Port used by Speos server for HTTP transfer.

Start server

The first option is to use the Docker image from the PySpeos repository on Github.

Use a GitHub personal access token with permission for reading packages to authorize Docker to access this repository. For more information, see Managing your personal access tokens in the GitHub documentation. Save the token to a file with this command:

echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > GH_TOKEN.txt

Since the Docker image contains no license server, you will need to enter your license server IP address in the LICENSE_SERVER environment variable. Then, to launch SpeosRPC server with product version 2025.1, you can run:

export GH_USERNAME=<my-github-username>
export LICENSE_SERVER=1055@XXX.XXX.XXX.XXX

cat GH_TOKEN.txt | docker login ghcr.io -u "$GH_USERNAME" --password-stdin
docker pull ghcr.io/ansys/speos-rpc:261
docker run --detach --name speos-rpc -p 127.0.0.1:50098:50098 -e ANSYSLMD_LICENSE_FILE=$LICENSE_SERVER --entrypoint /app/SpeosRPC_Server.x ghcr.io/ansys/speos-rpc:261 --transport_insecure --host 0.0.0.0

On the other hand, the SpeosRPC server can be started locally.

For Windows:

%AWP_ROOT251%\Optical Products\SPEOS_RPC\SpeosRPC_Server.exe

For Linux:

$AWP_ROOT251\OpticalProducts\SPEOS_RPC\SpeosRPC_Server.x

And test configuration file tests/local_config.json must be updated to use local server:

{
   "SpeosServerOnDocker": false,
   "SpeosContainerName" : "speos-rpc",
   "SpeosServerPort": 50098
}

Launch unit tests

pip install . --group tests
pytest -vx

Use jupyter notebook

pip install . --group jupyter
jupyter notebook

jupyter notebook can be downloaded from the documentations example section.

Features

Information of the latest stable release features:

PySpeos core features

Features supported in the latest release can be found at:

Speos RPC features

Speos RPC is based on a gRPC server and provides APIs to interact with Speos solver.

Features supported in the latest Speos RPC can be found at: Ansys Speos for developers Speos RPC.

License

PySpeos is licensed under the MIT license. The full license can be found in the root directory of the repository, see LICENSE.

Metadata

Release files for ansys-speos-core 0.10.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 ansys-speos-core 0.10.0
File Size Uploaded Provenance Actions
ansys_speos_core-0.10.0.tar.gz 268.7 kB With provenance Details for ansys_speos_core-0.10.0.tar.gz

Built distribution (wheel)

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

Total release size: 610.0 kB

Release files / ansys_speos_core-0.10.0.tar.gz

Download URL ansys_speos_core-0.10.0.tar.gz
Size 268.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ceeb557468f3b3c96fe4785e45a81fbc7e308276c6f7469c0f7bf906d8e499d9
BLAKE2b-256 checksum
How to use checksums
5f06d9b691fa61ddbf816745456fc60195c940b3230785a4ddcd487500554633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Release files / ansys_speos_core-0.10.0-py3-none-any.whl

Download URL ansys_speos_core-0.10.0-py3-none-any.whl
Size 341.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b79869a102334e3f234ef8264c45c473f4a1bf4ecc88ae726966153cefd53fb
BLAKE2b-256 checksum
How to use checksums
abd6f1f959c2b1f1518901b3375e1e640794d88f60b135ff49b3c39c8bcce4fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Security for ansys-speos-core 0.10.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ansys_speos_core-0.10.0.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 Nov 12, 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.

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