Solana Python API built on the JSON RPC API.
Python version of solana-web3.js for interacting with Solana.
Read the Documentation.
pip install solana
import solana
from solana.rpc.api import HTTP, WEBSOCKET, Client
http_client = Client(endpoint="https://devnet.solana.com", client_type=HTTP)
websocket_client = Client(endpoint="ws://localhost:8900", client_type=WEBSOCKET)
- Install pipenv.
brew install pipenv
- Install dev dependencies.
pipenv install --dev
- Activate the pipenv shell.
pipenv shell
make lint
# All tests
make tests
# Unit tests only
make unit-tests
# Integration tests only
make int-tests
Install docker.
# Update/pull latest docker image
pipenv run update-localnet
# Start localnet instance
pipenv run start-localnet
make notebook