Skip to main content

Python interface for reading and writing Tecplot data files

Project description

tecio

License CI Codecov Docs PyPI Python

Python interface for reading and writing Tecplot data files.

Overview

tecio wraps Tecplot's TecIO C library to provide a Python API for reading and writing Tecplot binary formats (.szplt, .plt) and ASCII (.dat). It also includes command-line tools for common file operations such as converting formats, extracting zones, and computing statistics.

Requirements: Python 3.10+, NumPy, Tecplot 360 (or the standalone TecIO library)


Installation

pip install tecio-python

The TecIO shared library (libtecio.so / libtecio.dylib) is not bundled with this package and must be provided separately via a Tecplot 360 installation or the standalone TecIO library. Set the TECIO_LIB environment variable to point to the library if it is not on your system path:

export TECIO_LIB=/path/to/libtecio.so     # Linux
export TECIO_LIB=/path/to/libtecio.dylib  # macOS

Quick start

import tecio
import numpy as np

x = np.linspace(0, 2 * np.pi, 100)
y = np.sin(x)

with tecio.open("sine.szplt", "w") as tec:
    tec.write_ijk_zone(data=[x, y], variables=["x", "y"])

Reading a file:

with tecio.open("sine.szplt", "r") as tec:
    print(tec.variables)   # ['x', 'y']
    x = tec.zone[0].variable[0].values
    y = tec.zone[0].variable[1].values

API

All file access goes through tecio.open, which selects the correct format handler from the file extension and returns a context manager:

Mode Description
"r" Read an existing file
"w" Write a new file
"x" Write, failing if the file already exists
"a" Append new zones to an existing file
"a+" Append and read in the same session

Supported formats:

Extension Format
.szplt Tecplot SZL binary (subzone-loadable)
.plt / .bin Tecplot PLT binary
.dat / .tec Tecplot ASCII

Contributing

Contributions are welcome — see CONTRIBUTING.md for details.


References


Disclaimer

This project is an independent open source library and is not affiliated with, endorsed by, or supported by Tecplot, Inc. in any way. Tecplot and TecIO are trademarks of Tecplot, Inc. Use of the TecIO library requires a separate license from Tecplot, Inc.

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

tecio_python-0.1.0.tar.gz (155.2 kB view details)

Uploaded Source

Built Distribution

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

tecio_python-0.1.0-py3-none-any.whl (133.8 kB view details)

Uploaded Python 3

File details

Details for the file tecio_python-0.1.0.tar.gz.

File metadata

  • Download URL: tecio_python-0.1.0.tar.gz
  • Upload date:
  • Size: 155.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tecio_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3309104d7e1130d61bfaa4503fb42b64e2bd4ed5b936364b3b9eee8672fcb34
MD5 7cd818adf9dcc5dcada1710d60f2b7be
BLAKE2b-256 03734a56f1b44c49ca19aa2fe61df34616e3bae9fa254e8531b558462ea563e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tecio_python-0.1.0.tar.gz:

Publisher: publish.yml on meersman/tecio

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

File details

Details for the file tecio_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tecio_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 133.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tecio_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a1e575f846a48d72c16a67482067ffe4d0eb9b2d0f4ec115c915a8f8cd44bf2
MD5 5376f4f0c9ed88acf69abb5c2f73db69
BLAKE2b-256 0d75168ce0a6d8043d4a20ea929fb34257b61be5828cb751e13045427dadb50c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tecio_python-0.1.0-py3-none-any.whl:

Publisher: publish.yml on meersman/tecio

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