solana
Solana.py
What it is and what it does
Solana.py is the official Python SDK for the Solana blockchain. It provides async and websocket clients to interact with Solana's JSON RPC API, allowing you to query blockchain state, build and submit transactions, and monitor on-chain events. The package wraps core Solana types from the solders library and covers the SPL Token Program for token operations.
The library is designed for developers building Python applications on Solana—from simple queries to complex transaction construction. It supports both async/await patterns and context managers for resource management, making it suitable for production services. The package is actively maintained and supports current Python versions (3.11 through 3.14).
Use it for:
- Query account balances, transaction history, and on-chain program state via the Solana RPC API.
- Build and submit transactions to the Solana blockchain from Python applications.
- Subscribe to real-time blockchain events (logs, account changes) using websocket connections.
- Interact with SPL Token Program for token transfers, minting, and account management.
- Integrate Solana blockchain functionality into async Python services and web frameworks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Solana.py is a Python SDK for building transactions and interacting with the Solana blockchain via its JSON RPC API, with support for the SPL Token Program.
Yes. Solana.py is the canonical Python SDK for Solana development, actively maintained with no known vulnerabilities, permissive MIT licensing, and low install friction. Install it if you are building on Solana in Python. The only caveat is the Python 3.11+ requirement; if you are on an older version, you cannot use this package.
Install
solana on PyPI
pip
pip install solanauv
uv add solanapoetry
poetry add solanaInstalling solana
Before you install
Low friction install with a pure-Python wheel. Active maintenance: last commit 2026-08-01, release 28 days ago. Requires Python 3.11 or later. Six runtime dependencies including pydantic, solders, and websockets are all widely-used packages.
License in practice
MIT license (permissive) — you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
pip install solana
import asyncio
from solana.rpc.async_api import AsyncClient
async def main():
async with AsyncClient("https://api.devnet.solana.com") as client:
res = await client.is_connected()
print(res)
asyncio.run(main())
Requires Python 3.11 or later. The async API examples assume familiarity with asyncio.
Verify before relying
- Whether the package is actively maintained beyond the latest commit date shown (2026-08-01).
- Performance characteristics and rate-limiting behavior when making high-volume RPC calls.
- Completeness of SPL Token Program coverage compared to the official Solana documentation.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — aiolimiter, construct-typing, httpx2, pydantic, solders, websockets |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,112,744/month — #4,353 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: solana-0.40.1-py3-none-any.whl
Keywords: blockchain, solana, web3
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
anchorpyAnchorPy is a Python client library for…
unclear · top 15,000 on PyPI
soldersSolders is a high-performance Python toolkit…
unclear · top 5,000 on PyPI
web3web3.py is a Python library for interacting…
permissive · top 5,000 on PyPI
cdp-sdkPython client library for the Coinbase…
permissive · top 15,000 on PyPI
stellar-sdkStellar SDK provides Python APIs to build and…
permissive · top 15,000 on PyPI
aptos-sdkProvides Python bindings to interact with the…
permissive · top 15,000 on PyPI
injective-pyInjective Python SDK provides client libraries…
permissive · top 15,000 on PyPI
x402Implements the x402 payment protocol with…
permissive · top 15,000 on PyPI
cosmpyCosmPy provides Python bindings to interact…
permissive · top 15,000 on PyPI