Skip to main content

surfio

Surfio is a library for reading and writing surface files. Currently only supports the irap format.

Installation

pip install .

Usage

Irap surfaces can be imported using the from_ascii_file, from_ascii_string, from_binary_file and from_binary_buffer methods of IrapSurface.

import surfio


surface = surfio.IrapSurface.from_ascii_file("./file.irap")
print(surface.header.ncol, surface.header.nrow)  # 10, 11
print(surface.values.shape)  # (10, 11)

from_ascii_file is equivalent to

with open("./file.irap") as f:
    surface = surfio.IrapSurface.from_ascii_string(f.read())

but is more performant.

Exporting irap surfaces can be done with

    surface = surfio.IrapSurface(
        surfio.IrapHeader(
            ncol=3,
            nrow=2,
            xori=0.0,
            yori=0.0,
            xinc=2.0,
            yinc=2.0,
            xmax=2.0,
            ymax=2.0,
            rot=0.0,
            xrot=0.0,
            yrot=0.0,
        ),
        values=np.zeros((3, 2)),
    )
    surface.to_ascii_file("./file.txt")

which is equivalent to:

with open("./file.irap", mode="w") as f:
    f.write(surface.to_ascii_file())

Development

We use uv to manage the development environment and its dependencies. See installing uv. We recommend installing uv using your system's package manager, or into a small dedicated virtual environment.

Once uv is installed, you can get a development environment by running:

git clone https://github.com/equinor/surfio
cd surfio
uv sync --all-groups

This builds the C++ extension and installs surfio, together with its test and development dependencies, into a .venv.

We use just as a command runner for common development tasks. The most useful recipes are:

uv run just build-python   # (Re)build and install the surfio python package
uv run just test           # Run both the C++ and python test suites
uv run just test-python    # Run only the python test suite
uv run just lint           # Run all linters/formatters via pre-commit

Style is enforced via pre-commit. To have it run automatically on each commit:

uv run just install-pre-commit-hooks

C++ development

The C++ project can also be configured, built and tested independently of building/installing the Python package, using just:

uv run just configure-cpp
uv run just build-cpp
uv run just test-cpp

which is equivalent to running the underlying cmake/ctest commands directly, e.g.

cmake --preset release-posix
cmake --build --preset release-posix
ctest --preset test-posix

Metadata

Release files for surfio 0.0.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for surfio 0.0.27
File Actions
surfio-0.0.27-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for surfio-0.0.27-cp314-cp314-win_amd64.whl
surfio-0.0.27-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for surfio-0.0.27-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
surfio-0.0.27-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for surfio-0.0.27-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
surfio-0.0.27-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details for surfio-0.0.27-cp314-cp314-macosx_26_0_arm64.whl
surfio-0.0.27-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for surfio-0.0.27-cp313-cp313-win_amd64.whl
surfio-0.0.27-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for surfio-0.0.27-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
surfio-0.0.27-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for surfio-0.0.27-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
surfio-0.0.27-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details for surfio-0.0.27-cp313-cp313-macosx_26_0_arm64.whl
surfio-0.0.27-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for surfio-0.0.27-cp312-cp312-win_amd64.whl
surfio-0.0.27-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for surfio-0.0.27-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
surfio-0.0.27-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for surfio-0.0.27-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
surfio-0.0.27-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details for surfio-0.0.27-cp312-cp312-macosx_26_0_arm64.whl

Total release size: 12.9 MB

Release files / surfio-0.0.27-cp314-cp314-win_amd64.whl

Download URL surfio-0.0.27-cp314-cp314-win_amd64.whl
Size 436.3 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
eeb770f69b5558cfa76db2a12a4fac647a64bcd7be892bcbafed263fef125884
BLAKE2b-256 checksum
How to use checksums
884717bc9ba786fa16ed7dd85e8674134cbadef49e95284e0ffae4193b48e021
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL surfio-0.0.27-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 369.3 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e20959fa63fde2e0330ce0f091ff2ab23dcaf95fb2890c148aa1fac036eff246
BLAKE2b-256 checksum
How to use checksums
74d2197fb1a48419a54efa5f3eb6731fc2790f9984810b219613c38e505e706f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL surfio-0.0.27-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 335.8 kB
Tags CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
752cf780600c7223adf0fce493d2f1b02d5f6ed5cf6e5f2954e2991fcb3d905e
BLAKE2b-256 checksum
How to use checksums
4015ea30b5357c82af80e3d410eafab0d94ab298ede47dd5b574983ed9f3d9cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp314-cp314-macosx_26_0_arm64.whl

Download URL surfio-0.0.27-cp314-cp314-macosx_26_0_arm64.whl
Size 3.2 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
ca124cee5847b4a1a9f19c05a79a229ba7a310546da79612ad9f9cb3dc9d3df2
BLAKE2b-256 checksum
How to use checksums
074b1d281ac9d329093100f37f9093f45065a6a98a1d19a99190e9e8602e5692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp313-cp313-win_amd64.whl

Download URL surfio-0.0.27-cp313-cp313-win_amd64.whl
Size 423.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
da4ac1e03bc632d4bf727998d3c85a82b2abcb826a6e90367d1485efbe156c85
BLAKE2b-256 checksum
How to use checksums
4658223693ab93ec7d033f15e640ae6aba8d2465f7ad4c7d6258902b7b83787e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL surfio-0.0.27-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 369.2 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e2267111efa7be9d26905f64fdbde58d0b20fd1962c295090e811fa5ecb2883d
BLAKE2b-256 checksum
How to use checksums
f8fc4f683b541eab02016cf826bd6d1aeeba07cf83aca2e42988f4c1ab7c72fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL surfio-0.0.27-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 335.3 kB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
91655c49fca238660ea0714fc1395a048c23117d18e89060a230cea2783ef3d5
BLAKE2b-256 checksum
How to use checksums
0568244938a37e73ff0c5aee70dd58cacfa88c1704eb413665fa7eaf57392119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp313-cp313-macosx_26_0_arm64.whl

Download URL surfio-0.0.27-cp313-cp313-macosx_26_0_arm64.whl
Size 3.2 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
e876ea574154fc654d72edccf236d64b0d23352275bbde14ec1f89e8427a7b93
BLAKE2b-256 checksum
How to use checksums
b220e314045674ceab05a7fb11c50ce9827c90655e26c0a2d6fc2ddbd0001d5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp312-cp312-win_amd64.whl

Download URL surfio-0.0.27-cp312-cp312-win_amd64.whl
Size 423.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0747ad9229340c212db5ee7f306e2e5018e719dd8754df9ca151aea1742cce3c
BLAKE2b-256 checksum
How to use checksums
065ab7c9fa6367fd3e127d50280aaa074e5aa369d4ebffd75c6892e538966f3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL surfio-0.0.27-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 369.2 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3c2ccdd5e3f67fab36eb7aac9b51c62bd71722753ca98bab059df0ed2c9233bc
BLAKE2b-256 checksum
How to use checksums
7368d9d3e672d6ae1629211fd07511b5b57117bf9aac4c24ce9138af9f74de62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL surfio-0.0.27-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 334.6 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
75246fee6d70a6817c0a2c1551514b8670790566e824d9ec609ac88e092f7e04
BLAKE2b-256 checksum
How to use checksums
e7d7aa7dcedb8934178a5ee685ff27eb2bdf39fc47727f4fa6aa9a937105cce8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / surfio-0.0.27-cp312-cp312-macosx_26_0_arm64.whl

Download URL surfio-0.0.27-cp312-cp312-macosx_26_0_arm64.whl
Size 3.2 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
1125e3ddfcfeb7d9a30c62c7a7c43c7841af87a936c92c4eb8b409883b039d3f
BLAKE2b-256 checksum
How to use checksums
9a295bc5ec4b7bea7dc10072f9b3a77ea9aedf6a2f3a21feb7d18a008126e26e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for surfio 0.0.27

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 12 files in this release have been uploaded with provenance metadata.

Select from 12 files

Attestation for surfio-0.0.27-cp314-cp314-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page