Python bindings for Solana Rust tools
Project Links
Meta
Author: kevinheavey
Requires Python: >=3.8,<4.0
Classifiers
Programming Language
- Rust
- Python :: Implementation :: CPython
- Python :: Implementation :: PyPy
Solders
solders is a high-performance Python toolkit for Solana, written in Rust. It provides robust solutions to the following problems:
- Core SDK stuff: keypairs, pubkeys, signing and serializing transactions - that sort of thing.
- RPC stuff: building requests and parsing responses (no networking stuff - if you want help with that, solana-py is your friend).
- Integration testing stuff: the
solders.litesvmmodule is an alternative tosolana-test-validatorthat's much more convenient and much faster. It's based on solana-program-test if you know that is.
What about solana-py?
solders and solana-py are good friends. solana-py uses solders under the hood extensively in its
core API and RPC API. The main differences are:
soldersdoesn't have functions to actually interact with the RPC server (thoughsolana-pydoes use the RPC code fromsolders).soldersdoesn't provide SPL Token and SPL Memo clients.solana-pymay not have support for all the RPC requests and responses provided bysolders.solana-pydoesn't have anything like thelitesvmtesting kit.
Since solana-py uses solders under the hood and they don't duplicate each other's features, you should just use whichever library you need.
Installation
pip install solders
Note: Requires Python >= 3.7.
Example Usage
>>> from solders.message import Message
>>> from solders.keypair import Keypair
>>> from solders.instruction import Instruction
>>> from solders.hash import Hash
>>> from solders.transaction import Transaction
>>> from solders.pubkey import Pubkey
>>> program_id = Pubkey.default()
>>> arbitrary_instruction_data = bytes([1])
>>> accounts = []
>>> instruction = Instruction(program_id, arbitrary_instruction_data, accounts)
>>> payer = Keypair()
>>> message = Message([instruction], payer.pubkey())
>>> blockhash = Hash.default() # replace with a real blockhash
>>> tx = Transaction([payer], message, blockhash)
Development
Setup
- Install uv.
- Install the project dependencies (including dev tools):
uv sync --dev
- Activate the virtual environment (optional,
uv runworks without activation):
source .venv/bin/activate
Testing
- Run
uv run maturin developto compile the Rust code. - Run
uv run make fmt,uv run make lint, anduv run make test.
0.27.1
Nov 15, 2025
0.27.0
Oct 26, 2025
0.26.0
Feb 18, 2025
0.25.0
Jan 26, 2025
0.24.0
Jan 24, 2025
0.23.0
Nov 10, 2024
0.22.0
Oct 18, 2024
0.21.0
Mar 13, 2024
0.20.0
Feb 12, 2024
0.19.0
Jan 01, 2024
0.18.1
Jun 03, 2023
0.18.0
Jun 02, 2023
0.17.0
May 11, 2023
0.16.0
May 10, 2023
0.15.1
May 05, 2023
0.15.0
May 05, 2023
0.14.4
Feb 22, 2023
0.14.3
Jan 28, 2023
0.14.2
Jan 24, 2023
0.14.1
Jan 24, 2023
0.14.0
Jan 12, 2023
0.13.0
Jan 11, 2023
0.12.0
Jan 10, 2023
0.11.0
Jan 10, 2023
0.10.0
Oct 31, 2022
0.9.3
Oct 15, 2022
0.9.2
Oct 14, 2022
0.9.1
Oct 14, 2022
0.9.0
Oct 14, 2022
0.8.1
Oct 10, 2022
0.8.0
Oct 10, 2022
0.7.0
Oct 10, 2022
0.6.0
Oct 06, 2022
0.5.2
Oct 02, 2022
0.5.1
Sep 29, 2022
0.5.0
Sep 26, 2022
0.4.0
Aug 13, 2022
0.3.1
Jul 04, 2022
0.3.0
Jul 04, 2022
0.2.0
Jun 13, 2022
0.1.4
Jun 01, 2022
0.1.3
May 30, 2022
0.1.2
May 29, 2022
0.1.1
May 28, 2022
0.1.0
May 28, 2022
Wheel compatibility matrix
Files in release
solders-0.27.1-cp38-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (23.7MiB)
solders-0.27.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (6.2MiB)
solders-0.27.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2MiB)
solders-0.27.1-cp38-abi3-manylinux_2_28_aarch64.whl (6.3MiB)
solders-0.27.1-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.9MiB)
solders-0.27.1-cp38-abi3-musllinux_1_2_i686.whl (6.8MiB)
solders-0.27.1-cp38-abi3-musllinux_1_2_x86_64.whl (6.5MiB)
solders-0.27.1-cp38-abi3-win_amd64.whl (5.0MiB)
solders-0.27.1.tar.gz (176.7KiB)