A Python 3 client for odbAccess using pylife-odbserver
Project description
pylife-odbclient
A Modern Python client for odbAccess using pylife-odbserver
Purpose
Unfortunately Abaqus usually comes with an outdated python engine. So you can't access an Abaqus odb file from within modern python code using the latest packages. This python package is the client part of a client server setup to make odb files accessible from within python code using a current python version in a transparent way.
Solution
The sibling package pylife-odbserver provides a slim server that as python
software that is running with old python versions of Abaqus (even 2.7), 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
pipwith the command
pip install pylife-odbclient
- See the instructions in
pylife-odbserveron how to install the server.
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-serveris installed into.
Then you can instantiate a OdbClient object using
import odbclient as CL
client = CL.OdbClient("yourodb.odb")
See the API docs of OdbClient
for details.
Limitations
Limited functionality
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.
String literals
So far only names made of ascii strings are supported. That means that
instance names, node that names and the like containing non-ascii characters
like German umlauts will not work.
Development
Due to the server client architechture running the unit tests is not completely trivial. Here are some instructions on how to get them running.
Setting up the environments
As of now, we are assuming that conda is used to setup the server
environments. Probably we will change for uv in the future.
We provide a bash script in tests/create_server_envs.sh that you can run from
within the root folder of odbclient (the folder this README.md resides
in). Then it should generate all the necessary environments. You will have to
run the script again, if there has been a release update in between.
The script is not well tested. So please be prepared for some manual steps.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylife_odbclient-2.2.1.tar.gz.
File metadata
- Download URL: pylife_odbclient-2.2.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
492c0f054c431e606c5dae86bf090d54e3a29466c49461334e51e8131c6293ba
|
|
| MD5 |
6508dae4bb9f5bd9eb102b1e03b69633
|
|
| BLAKE2b-256 |
a1aabc6cf51e28482fdb81917f7a23004f7bddc729c5348aba67b7acc0b72750
|
Provenance
The following attestation bundles were made for pylife_odbclient-2.2.1.tar.gz:
Publisher:
pypi-deploy-odbclient.yml on boschresearch/pylife
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylife_odbclient-2.2.1.tar.gz -
Subject digest:
492c0f054c431e606c5dae86bf090d54e3a29466c49461334e51e8131c6293ba - Sigstore transparency entry: 969219089
- Sigstore integration time:
-
Permalink:
boschresearch/pylife@f046803ea4337aee6533e626e3cd5e8b36950a6f -
Branch / Tag:
refs/tags/2.2.1 - Owner: https://github.com/boschresearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-deploy-odbclient.yml@f046803ea4337aee6533e626e3cd5e8b36950a6f -
Trigger Event:
release
-
Statement type:
File details
Details for the file pylife_odbclient-2.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: pylife_odbclient-2.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26db5bb04171542326834e87a9560e4217524a9f5ad63686967f05f4b62af5c
|
|
| MD5 |
92a03d022f420cecea53d789df0a5dd7
|
|
| BLAKE2b-256 |
dc2855529a61ba6cfbff4889c6578f6b1c3de462ec608e36776a950be9cc6aba
|
Provenance
The following attestation bundles were made for pylife_odbclient-2.2.1-py2.py3-none-any.whl:
Publisher:
pypi-deploy-odbclient.yml on boschresearch/pylife
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylife_odbclient-2.2.1-py2.py3-none-any.whl -
Subject digest:
d26db5bb04171542326834e87a9560e4217524a9f5ad63686967f05f4b62af5c - Sigstore transparency entry: 969219094
- Sigstore integration time:
-
Permalink:
boschresearch/pylife@f046803ea4337aee6533e626e3cd5e8b36950a6f -
Branch / Tag:
refs/tags/2.2.1 - Owner: https://github.com/boschresearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-deploy-odbclient.yml@f046803ea4337aee6533e626e3cd5e8b36950a6f -
Trigger Event:
release
-
Statement type: