+
Skip to content

aleexharris/anchorpy

 
 

Repository files navigation

AnchorPy


Discord Chat

AnchorPy is the gateway to interacting with Anchor programs in Python. It provides:

  • A static client generator
  • A dynamic client similar to anchor-ts
  • A Pytest plugin
  • A CLI with various utilities for Anchor Python development.

Read the Documentation.

Installation (requires Python >=3.9)

pip install anchorpy[cli, pytest]

Or, if you're not using the CLI or Pytest plugin features of AnchorPy you can just run pip install anchorpy.

Development Setup

AnchorPy does not currently support Solana 2.0 or Anchor 0.30.0.

If you want to contribute to AnchorPy, you will require the following installed, in the following order:

Now, follow these steps to get set up:

  1. Generate a new Solana keypair for local development and configure the Solana CLI to use a localnet for testing:
solana-keygen new --outfile ~/.config/solana/id.json
solana config set --url localhost
  1. Git clone the repo and initialise the submodules:
git clone https://github.com/kevinheavey/anchorpy.git
git submodule update --init
  1. Install dev dependencies:
poetry install
  1. Run the included tests:
poetry run pytest

About

The Python Anchor client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.9%
  • Rust 1.9%
  • Other 0.2%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载