avax-python – Python utils for AVAX Avalanche network exploration

avax-python is a Python library and utils for the exploration of the Avalanche AVAX network.

Includes an implementation of basic AVAX API calls.


Clone the git repo and run scripts within the downloaded avax-python/ subdirectory.

git clone
cd avax-python

If you don't have a git client available, you may download a ZIP archive instead.


Generate Random Mnemonic Phrase (Generate Wallet)

From the avax-python root directory, run:

python3 offline/wallet/ 
gas ecology detail erase mandate legend fever chicken rule crop detect length shoot tattoo ozone elder present attend seven tonight wild spell dash hedgehog

You can generate several wallets at once by passing a number argument:

python3 offline/wallet/ 3
orphan decline express slogan hub oven frequent must approve kitchen clarify cargo journey pony armor potato chase during uphold critic cover ankle club media
clinic supply vault slice style news front casual predict vital depth among wolf diagram gas used dolphin peasant pact wrong chaos science mixture crowd
drill abstract solar magic crash derive chief fish mention sausage tenant drum violin enroll excess wife capable special tent venue predict captain museum question

List Addresses From Mnemonic Phrase

Given a mnemonic phrase, list AVAX addresses:

python3 offline/wallet/ drill abstract solar magic crash derive chief fish mention sausage tenant drum violin enroll excess wife capable special tent venue predict captain museum question

Launch a subnet validator:

First, generate user/password credentials for your node.

Then, enter your username and password on userpass.txt.

Then run:

python3 <dest_P_addr> <amount_nAVA> 

to send funds from X-Chain to P-Chain, then



Export all Blockchains IPC



If you update the api.specification file, then you must regenerate the API metainformation file

To recreate it, run


Implement the AVA API in Any Language

The script reads the API specification in api.specification, the grammar in api.tatsu and generates an AST which can be used to implement the API in any language.

If you need to customize the API, the api.specification file format is very simple.

  • An API endpoint begins a new section. Leave a blank line after the endpoint:/url/here line.
  • See the provided api.specification file and follow the same syntax for function definitions.
  • Functions can be defined over several lines. Don't leave blank lines within a function definition.
  • Leave one blank line after each function definition.

To customize the generator grammar, see the Tatsu documentation

Note that changing the grammar will require changes to The generator uses hard coded offsets which will break if the grammar is modified.


If you plan on generating the python files from api.specification, then requires TatSu

sudo pip install TatSu    


This software released under the MIT license.

See the LICENSE file in this distribution for details.

Legal Notice

Avalanche and AVAX are registered trademarks of Ava Labs Inc.

This is not an official Ava Labs project. We are in no way affiliated with Ava Labs.

This free open source software provided for Avalanche AVAX learning and exploration purposes.


avax-python Github Project Page

About the Author
Published by Crypto Bill - Bill is a writer, geek, crypto-curious polyheurist, a dog's best friend and coffee addict. Information security expert, encryption software with interests in P2P networking, decentralized applications (dApps), smart contracts and crypto based payment solutions. Learn More About Us