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
    # or
    x, y = tec.zone[0].get_array(["x", "y"])

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.1.tar.gz (173.8 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.1-py3-none-any.whl (147.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tecio_python-0.1.1.tar.gz
  • Upload date:
  • Size: 173.8 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.1.tar.gz
Algorithm Hash digest
SHA256 f59d5fd1b77362c4f835f4d7d38caf7ab00dfd9d0d1681114bf499e3fbfcc933
MD5 4bb3731b083e165863c9b9250c002b7f
BLAKE2b-256 7cece4e4463afc7ce04ee443d71abf9e51eec420ce2e273f597044b4bda8a775

See more details on using hashes here.

Provenance

The following attestation bundles were made for tecio_python-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: tecio_python-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 147.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4610758385190d3cffbc17cf678cc1a6469923ae78fab1d86bde5f0093ad6b89
MD5 b512965498b3111b56f4c55ab27c52f6
BLAKE2b-256 25f37a1ae9812f7b841436ca85f619864c73db559e241b39a63fd6e88500d797

See more details on using hashes here.

Provenance

The following attestation bundles were made for tecio_python-0.1.1-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