somebodyLi / solana-py

Solana Python SDK

Home Page:https://michaelhly.github.io/solana-py

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Solana Python SDK

https://michaelhly.github.io/solana-py

License:MIT License


Languages

Language:Python 92.8%Language:Jupyter Notebook 5.6%Language:Shell 1.0%Language:Makefile 0.6%