# Python Stable Binary API

**URL:** https://discourse.paraview.org/t/python-stable-binary-api/4793
**Category:** Development
**Created:** [July 9, 2020, 5:51pm UTC](https://discourse.paraview.org/t/python-stable-binary-api/4793 "2020-07-09T17:51:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [July 9, 2020, 5:51pm UTC](https://discourse.paraview.org/t/python-stable-binary-api/4793/1 "2020-07-09T17:51:12Z")

</div>

Is anyone familiar with [Python Stable Application Binary Interface](https://docs.python.org/3.5/c-api/stable.html)? Am I reading this correctly that if we build ParaView limiting ourselves to the stable API we can always easily use any compatible version of Python at runtime? If so, does anyone know if the API is adequate enough for our use-cases?

If answer to all of these is yes, that’d be a great way of avoiding having to build and package specific version of Python in ParaView and instead flexibly support whatever version’s available on the user’s system.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 6, 2021, 3:46pm UTC](https://discourse.paraview.org/t/python-stable-binary-api/4793/2 "2021-01-06T15:46:07Z")

</div>

It’s not sufficient because we define our own PyObject type structures. To declare them, we need to “access” every structure field. The stable ABI only guarantees that `ob_refcnt` and `ob_type` are accessible. You can see this in the field change that happened in 3.9 that we had warnings about the `0`/`nullptr` mismatch.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 6, 2021, 3:47pm UTC](https://discourse.paraview.org/t/python-stable-binary-api/4793/3 "2021-01-06T15:47:29Z")

</div>

Though we could declare our own types using this:

> [@](#):
>
> The structure of type objects is not available to applications; declaration of “static” type objects is not possible anymore (for applications using this ABI). Instead, type objects get created dynamically. To allow an easy creation of types (in particular, to be able to fill out function pointers easily), the following structures and functions are available:
