Skip to main content

Provides a helper to create sessions for use with Ansys OpenAPI clients.

Project description

PyAnsys Python PyPI GH-CI MIT Black pre-commit.ci status

OpenAPI-Common

OpenAPI Common is designed for use with the custom code generation template in the PyAnsys project. It provides the source code for an authentication-aware client for OpenAPI client libraries.

Background

A widely used standard for HTTP REST-style APIs is the OpenAPI standard, formerly known as Swagger. OpenAPI-Common is designed to be used alongside code generation tools to produce client libraries for HTTP APIs.

Because some Ansys products expose HTTP APIs rather than gRPC APIs, this Python library provides a common client to consume HTTP APIs, minimizing overhead and reducing code duplication.

OpenAPI-Common supports authentication with Basic, Negotiate, NTLM, and OpenID Connect. Most features of the underlying requests session are exposed for use. Some basic configuration is also provided by default.

Dependencies

The ansys.openapi.common package currently supports Python version 3.10 through 3.14.

Platform-specific Kerberos configuration

Kerberos authentication should be supported wherever the MIT or Heimdal Kerberos client can be installed. OpenAPI-Common has been tested on the platforms that follow. If you manage to use it on another platform, consider contributing installation steps for your platform by making a pull request.

Ubuntu 20.04

Ubuntu requires the gssapi Python module to be built from source. This requires the Kerberos headers, Python headers for the version of Python that you are using, and a supported compiler. (GCC works well.)

You should then be able to install this module with the [linux-kerberos] extra:

sudo apt install build-essentials python3.8-dev libkrb5-dev
pip install ansys-openapi-common[linux-kerberos]

Once the installation completes, ensure that your krb5.conf file is set up correctly for your Kerberos configuration and that you have a valid keytab file, which is normally in /etc/krb5.keytab.

Installation

To install the latest OpenAPI-Common release from PyPI, run this command:

pip install ansys-openapi-common

Alternatively, to install the latest development version from the OpenAPI-Common repository, run this command:

pip install git+https://github.com/ansys/openapi-common.git

To install a local development version with Git and uv, run these commands:

git clone https://github.com/ansys/openapi-common
cd openapi-common
uv sync

The preceding commands install the package in development mode so that you can modify it locally. Your changes are reflected in your Python setup after restarting the Python kernel.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_openapi_common-2.4.0rc0.tar.gz (592.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_openapi_common-2.4.0rc0-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file ansys_openapi_common-2.4.0rc0.tar.gz.

File metadata

  • Download URL: ansys_openapi_common-2.4.0rc0.tar.gz
  • Upload date:
  • Size: 592.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ansys_openapi_common-2.4.0rc0.tar.gz
Algorithm Hash digest
SHA256 c993ae094c67ca664e7cc2619a7d81448eceee5c23756c5113a5731a2d4d32df
MD5 d5f9827d692319e31af80de8dad38188
BLAKE2b-256 5b189348bb412d1c13e4aa83d8dfbadd54b1d2425caa5ffb973f6cd83365b5d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_openapi_common-2.4.0rc0.tar.gz:

Publisher: ci_cd.yml on ansys/openapi-common

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_openapi_common-2.4.0rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_openapi_common-2.4.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa0f5e740a91692d1d9d2cdede42c7fd7308342cfb5c183fad1a7569f3792eac
MD5 959e927fe30dd6179f365a76da1492ef
BLAKE2b-256 97dd599af97123c6358f7eaac1b985c9f83e92feb6b50741a7667f64d555a9cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_openapi_common-2.4.0rc0-py3-none-any.whl:

Publisher: ci_cd.yml on ansys/openapi-common

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page