# Web3 Foundation subxtpy Grant

**URL:** https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914
**Category:** Applications
**Tags:** python, subxt, rust, py-polkadot-sdk
**Created:** [8 February 2025 14:36 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914 "2025-02-08T14:36:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bgallois](https://forum.duniter.org/user_avatar/forum.duniter.org/bgallois/32/10334_2.png) [@bgallois](https://forum.duniter.org/u/bgallois)
#### Post date: [8 February 2025 14:36 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914/1 "2025-02-08T14:36:05Z")

</div>

@vit @HugoTrentesaux As mentioned yesterday (with a small mistake—it’s **subxt-python** and not **substrate-interface** that was subsidized by the Web3 Foundation: [Proposal for `subxt-python` by philoniare · Pull Request #2246 · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/pull/2246)), the Web3 Foundation Grants Program supports projects where “our focus lies on strong technical projects that add value to the ecosystem.” You can see accepted applications here: [Pull requests · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/pulls?q=is%3Apr).

Maintaining and updating a Python library necessary to interact with Substrate definitely falls within this scope, provided a case can be made that it is essential to the ecosystem and not already covered by an existing financed project like **subxt-python**.

There is also a maintenance grant, which focuses on fixing bugs, updating outdated features, and providing cost reports at the end of each month, that could be considered.

This can be a great way to free up some time for an individual or a small team to provide a more robust library for client development.

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [9 February 2025 11:44 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914/2 "2025-02-09T11:44:04Z")

</div>

Thanks for pointing out this project!

Out of my research here is what I found:

- Blog posts:
  - [https://www.philoniare.com/blog/subxtpy](https://www.philoniare.com/blog/subxtpy)
  - [https://www.philoniare.com/blog/real-time-subxtpy](https://www.philoniare.com/blog/real-time-subxtpy)

- Grant Milestones:
  - [Subxtpy Milestone 1 by philoniare · Pull Request #1205 · w3f/Grant-Milestone-Delivery · GitHub](https://github.com/w3f/Grant-Milestone-Delivery/pull/1205)
  - [Subxtpy Milestone 2 by philoniare · Pull Request #1213 · w3f/Grant-Milestone-Delivery · GitHub](https://github.com/w3f/Grant-Milestone-Delivery/pull/1213)

- Repository: [GitHub - philoniare/subxtpy: Interact with Substrate based nodes in Rust or WebAssembly using Python](https://github.com/philoniare/subxtpy)
- [on PyPI](https://pypi.org/project/subxtpy/)
- [`subxtpy` documentation](https://philoniare.github.io/subxtpy/)

This project has a potential! Right now, it seems unknown from the community, since I am the first one starring it on GH, and there are no issue nor PR. philoniaire did set up the first bricks against remunerations, but, no community took over this project. If the project ever gets or is unmaintained, problems could begins.

I had an issue with [a Python library](https://git.duniter.org/clients/python/silkaj/-/issues/492) using Rust which still does not support Python 3.13. Currently `subxtpy` does not support Python 3.13. That’s not the case with a full-Python library, which usually support next minor Python version out-of-the-box, except required minor code changes regarding deprecations. On the other hand, Python library based on Rust code, requires more efforts to support next Python minor version.  
The project also has to create a new release to publish wheels with built code on PyPI, to support new Python versions. That’s one disadvantage for using compiled languages in Python libraries. The advantage is of course speed. In the end, these criteria falls into maintenance topics.

These are my fears. But yeah, that’s good to have a second choice! Two Python libraries 🐍

@vit one aspects you might not like about `subxtpy` is that it forces the asynchronism property usage.

---

<div class="post-metadata">

### Author: ![vit](https://forum.duniter.org/user_avatar/forum.duniter.org/vit/32/2775_2.png) [@vit](https://forum.duniter.org/u/vit)
#### Post date: [10 February 2025 13:12 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914/3 "2025-02-10T13:12:28Z")

</div>

So I had a look at the `subxtpy` repo : its all Rust code! 😱

I totally agree with your warnings.

### The pro

- Fast.
- Use the official `subxt` Rust library directly in a python application.
- Follow `subxt` official API and updates.

### The con

- Only a wrapper coded in Rust. **Can not be enhanced or maintained by a Python developer. Zero Python code !**
- **No Python documentation.** Only a link to the Rust documentation of `subxt`.
- Use manual function calls as strings like pysubstrate-interface (but have tell the web3 grant program it will use a better method…).
- Only usable in an Python application with `asyncio` event loop. (Or need an adapter to use it with a GUI event loop application like Qt).
- **`asyncio` keywords flood problem.** All python methods using an asyncio lib must be declared as `async` methods, even no concurrent ones !

**If this library wrapper could be forked without the `asyncio` dependency, it would be a blast !**

But it should have a real Python documentation.

And we have to keep in mind that only Rust developers with Python package knowledge could contribute to it.

---

<div class="post-metadata">

### Author: ![tuxmain](https://forum.duniter.org/user_avatar/forum.duniter.org/tuxmain/32/6423_2.png) [@tuxmain](https://forum.duniter.org/u/tuxmain)
#### Post date: [10 February 2025 13:38 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914/4 "2025-02-10T13:38:46Z")

</div>

> [@vit](#):
>
> If this library wrapper could be forked without the `asyncio` dependency, it would be a blast !

Subxt requires an async runtime. The only way would be to wrap the async parts into blocking functions. This could be done in Rust as well as in Python.

The runtime used here is single-threaded tokio, so I guess you can use it with blocking and handle the multithreading yourself.

---

<div class="post-metadata">

### Author: ![bgallois](https://forum.duniter.org/user_avatar/forum.duniter.org/bgallois/32/10334_2.png) [@bgallois](https://forum.duniter.org/u/bgallois)
#### Post date: [10 February 2025 14:20 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914/5 "2025-02-10T14:20:19Z")

</div>

My point was not to switch to subxtpy, but to show that if anyone has the time or can allocate time through a grant, the Web3 Foundation can help. The idea is simply to present the limitations/disadvantages of subxtpy to the Web3 committee so that substrate-interface can be financed alongside it.

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [10 February 2025 18:55 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914/6 "2025-02-10T18:55:34Z")

</div>

> [@vit](#):
>
> No Python documentation

I had a hard time to find the Python documentation. Here it is, (linked above):

- [SubxtPy](https://philoniare.github.io/subxtpy/)

stored in [subxtpy/docs\_src at main · philoniare/subxtpy · GitHub](https://github.com/philoniare/subxtpy/tree/main/docs_src)

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [29 March 2025 17:47 UTC](https://forum.duniter.org/t/web3-foundation-subxtpy-grant/12914/7 "2025-03-29T17:47:14Z")

</div>

Actually `py-substrate-interface` via Polkascan Foundation got grantings.

- [Maintenance & Support Substrate Python API (Jan-Mar 2024) | Polkassembly](https://polkadot.polkassembly.io/treasury/760)
- [social-contract/polkadot/treasury-proposal-008-report-2024Q1.md at master · polkascan/social-contract · GitHub](https://github.com/polkascan/social-contract/blob/master/polkadot/treasury-proposal-008-report-2024Q1.md)
