Skip to content

DaveWK/solana-py

 
 

Repository files navigation

Actions Status PyPI version PyPI pyversions Codecov License: MIT Code style: black

Solana.py

Solana Python API built on the JSON RPC API.

Python version of solana-web3.js for interacting with Solana.

Read the Documentation.

Quickstart

Installation

pip install solana

General Usage

import solana

API Client

from solana.rpc.api import Client

http_client = Client("https://devnet.solana.com")

Development

Setup

  1. Install pipenv.
brew install pipenv
  1. Install dev dependencies.
pipenv install --dev
  1. Activate the pipenv shell.
pipenv shell

Lint

make lint

Tests

# All tests
make tests
# Unit tests only
make unit-tests
# Integration tests only
make int-tests

Start a Solana Localnet

Install docker.

# Update/pull latest docker image
pipenv run update-localnet
# Start localnet instance
pipenv run start-localnet

Using Jupyter Notebook

make notebook

Packages

No packages published

Languages

  • Python 92.6%
  • Jupyter Notebook 5.7%
  • Shell 1.1%
  • Makefile 0.6%