Skip to main content

PyPI version License: MIT

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.bankrun module is an alternative to solana-test-validator that'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:

  • solders doesn't have functions to actually interact with the RPC server (though solana-py does use the RPC code from solders).
  • solders doesn't provide SPL Token and SPL Memo clients.
  • solana-py may not have support for all the RPC requests and responses provided by solders.
  • solana-py doesn't have anything like the bankrun testing 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

  1. Install poetry
  2. Install dev dependencies:
poetry install
  1. Activate the poetry shell:
poetry shell

Testing

  1. Run maturin develop to compile the Rust code.
  2. Run make fmt, make lint, and make test.

Release files for solders 0.21.0

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

Source distribution (sdist)

Source distribution for solders 0.21.0
File Size Uploaded
solders-0.21.0.tar.gz 178.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for solders 0.21.0
File
solders-0.21.0-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details
solders-0.21.0-cp37-abi3-musllinux_1_2_x86_64.whl CPython 3.7 abi3 Linux musl 1.2+ x86-64 Details
solders-0.21.0-cp37-abi3-musllinux_1_2_i686.whl CPython 3.7 abi3 Linux musl 1.2+ x86-32 Details
solders-0.21.0-cp37-abi3-manylinux_2_28_aarch64.whl CPython 3.7 abi3 Linux glibc 2.28+ ARM64 Details
solders-0.21.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-64 Details
solders-0.21.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.7 abi3 Linux glibc 2.17+ ARMv7l Details
solders-0.21.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.7 abi3 Linux glibc 2.5+ x86-32 Details
solders-0.21.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.7 abi3 macOS 11.0+ ARM64, macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64) Details

Total release size: 102.6 MB

Release files / solders-0.21.0.tar.gz

Download URL solders-0.21.0.tar.gz
Size 178.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a228c09b690f215acb01c55e17246efdfdb7c013f7332b057ecd0499363868ad
BLAKE2b-256 checksum
How to use checksums
e8bc5c6f78e403854ebff50d86c3ec4b8fe1240777b3c8f6d94d1f1f85c479c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-win_amd64.whl

Download URL solders-0.21.0-cp37-abi3-win_amd64.whl
Size 5.3 MB
Tags CPython 3.7 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7258b0faa97ab3dc2e1951082af63f2971f178519540f7abac43ec2385d84b7f
BLAKE2b-256 checksum
How to use checksums
3d374926284e5d463edf3fe826c87f93016fc68f27c763f57f47b77b97127e9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-musllinux_1_2_x86_64.whl

Download URL solders-0.21.0-cp37-abi3-musllinux_1_2_x86_64.whl
Size 17.4 MB
Tags CPython 3.7 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
9521974ffa8b0fc8a4aa3b65f9057392c214a814c10af4f8cd2ad1d3f943ae61
BLAKE2b-256 checksum
How to use checksums
2866e788d1edae8472ba5d0fc9833d03611ee25227212f1719089078b38d1b80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-musllinux_1_2_i686.whl

Download URL solders-0.21.0-cp37-abi3-musllinux_1_2_i686.whl
Size 9.3 MB
Tags CPython 3.7 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
6993e2e1709aa04b94267597dc31e29ae5625cde3d65fdf452c6366c6c7f41cd
BLAKE2b-256 checksum
How to use checksums
b4009153205ab01afd829d8f30c25090974f7b7c7b56f4b7725393e58de08d86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-manylinux_2_28_aarch64.whl

Download URL solders-0.21.0-cp37-abi3-manylinux_2_28_aarch64.whl
Size 8.3 MB
Tags CPython 3.7 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
3ac70badd0da7e0d87db1c9c2edac63e48470903fd5f28e2fd6b22c7624ef52f
BLAKE2b-256 checksum
How to use checksums
720a895638da97e15a54845252ecfda6ed47f7fb221b078ef44a240e88431005
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL solders-0.21.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 17.3 MB
Tags CPython 3.7 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
33a28fedff80defd01455844700e3b9924c06a87d7ca93aff0a9298a9eb902ac
BLAKE2b-256 checksum
How to use checksums
b8b2af654348941ed5670ab20aa6d642caec3053cc29bf929a63d2f785e624e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL solders-0.21.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 8.1 MB
Tags CPython 3.7 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
a11dfc5933707c466880ef2116f1bffc74659bf677b79479f4280247d60543c9
BLAKE2b-256 checksum
How to use checksums
b2c1291ae85720ad0d4ff0a34076ea7c44a6ece552f7b8257781e06f9851d9fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl

Download URL solders-0.21.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Size 9.5 MB
Tags CPython 3.7 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
ac79feca36470945ac026433828d4105a4b3bada5422ea77b1083c0e8fe93872
BLAKE2b-256 checksum
How to use checksums
9e23cab1a1e1e4397d7d947c3c649901664cfef4c1ee4a0efccbcb0e8a74ad33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release files / solders-0.21.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL solders-0.21.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 27.2 MB
Tags CPython 3.7 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7df88e59aea016644c0b2eac84f2f931d5aa570c654132770263b26f2928fdb7
BLAKE2b-256 checksum
How to use checksums
823a80a252eccbd468a07a89747c9aa55c06f5897131e19722523946673422a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.0

Release history Release notifications | RSS feed

0.29.0

7 release files

0.27.1

9 release files

0.27.0

9 release files

0.26.0

9 release files

0.25.0

9 release files

0.24.0

9 release files

0.23.0

9 release files

0.22.0

9 release files

This release

0.21.0 This release

9 release files

0.20.0

9 release files

0.17.0

9 release files

0.16.0

9 release files

0.9.3

11 release files

0.9.2

11 release files

0.9.1

11 release files

0.9.0

11 release files

0.8.1

11 release files

0.8.0

11 release files

0.7.0

11 release files

0.5.1

11 release files

0.5.0

11 release files

0.4.0

11 release files

0.2.0

13 release files

0.1.3

13 release files

0.1.2

13 release files

0.1.1

13 release files

0.1.0

13 release files

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