Skip to main content

A Python 3 client for odbAccess using pylife-odbserver

Project description

pylife-odbclient

A Python 3 client for odbAccess using pylife-odbserver

Purpose

Unfortunately Abaqus still comes with a python-2.x engine. So you can't access an Abaqus odb file from within modern python code. This python package is the client part of a client server setup to make odb files accessible from within python-3.x code in a transparent way.

Solution

The sibling package pylife-odbserver provides a slim server that as python-2.7 software, that can be run inside the Abaqus python engine. It accepts command via sys.stdin and according to the command is querying data from the odbAccess interface and returning them in a pickle object.

This package comes with a python class OdbClient that spawns the server in the background when an instance of OdbClient is instantiated. Then the client object can be used to transparently access data from the odb file via the server. Once the client object goes out of scope i.e. is deleted, the server process is stopped automatically.

Installation

  • Install the odbclient using pip with the command
pip install pylife-odbclient

Once there are released versions the installation will be easier.

  • Install the server using pip install pylife-odbserver in a python-2.0 environment that is usable from the current Abaqus python engine.

  • Install the client package using pip install pylife-odbclient.

Usage

Usually you only will see the OdbClient class interface when you access an odb file. The only point you care about the server is when you instantiate an OdbClient object. You need to know the following things

  • The path to the Abaqus executable

  • The path to the python environment pylife-server is installed into.

Then you can instantiate a OdbClient object using

import odbclient as CL

client = CL.OdbClient("<path-to-abaqus>/abaqus", "<path-to-env>", "yourodb.odb")

See the API doc of OdbClient for details. (At the moment only in the sources, sorry.)

Limitations

Only a subset of Abaqus variable locations are supported. These are: nodal, element nodal, whole element and centroid. Integration point variables are extrapolated to element nodal.

You can only extract data from an odb file, not write to it.

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

pylife-odbclient-2.0.0.tar.gz (55.7 kB view details)

Uploaded Source

Built Distribution

pylife_odbclient-2.0.0-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pylife-odbclient-2.0.0.tar.gz.

File metadata

  • Download URL: pylife-odbclient-2.0.0.tar.gz
  • Upload date:
  • Size: 55.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pylife-odbclient-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b0538c0ba4581d56a8bd461a25c0bc924f81911afba97522679b552ab96ff816
MD5 e86ce2889a3638a9be10494f87c58814
BLAKE2b-256 49fd62719c08bb088746fa9b4e433b2ed7dd88d960e2dfe9617f46c68c1d4784

See more details on using hashes here.

File details

Details for the file pylife_odbclient-2.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pylife_odbclient-2.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pylife_odbclient-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 39cb49cd4c19b61df6e007b2cd796f3eba4bd8b18d3267fc202f49bfb26d76ec
MD5 05ec41f6a5ff7f6449cc818db7ee4f35
BLAKE2b-256 5740f418ad57bf0e6545e1e51758ae0a580dbd5af6bb246542fa3e51a448f0c2

See more details on using hashes here.

Supported by

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