Skip to content

sbneo2022/osmosispy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Osmosis python SDK

Python SDK for interacting with the Osmosis AMM.

Project Status: WIP -- Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. PyPI Version Documentation Status Discord Osmosis Stars MIT license

The osmosispy and osmosis_proto package allows you to interact with the Osmosis AMM using Python.

README Contents

Installation from PyPI

python -m pip install --upgrade pip

pip install osmosispy  # requires Python 3.11.2+

Usage

Ex: Creating a wallet and SDK client

example.py

#!/usr/bin/env python3

import osmosispy

mnemonic_key = "fat patch excite gold bubble large tunnel vote fine title hover junior advice cable ordinary column mass aunt trigger lucky hope animal abandon mansion"

# authorize in the mainnet
network = osmosispy.Network.mainnet()

trader = osmosispy.Sdk.authorize(key=mnemonic_key).with_network(network)

# print the address
print(trader.address)
$ python3 example.py
osmo1jggt8pcj2d8m9n62luytf8sdncj5uxfs3su2my

More examples

For more examples see the examples directory.

Publishing to PyPI

The publish workflow looks like this:

  1. Code-gen the new types from the chain. If there are changes, these should be committed.

    poetry run make proto-gen
  2. Increment the package version. For example, use poetry version preminor to do a pre-release for a minor version.

    poetry version [update-keyword]
  3. Create a tag and push it the remote origin.

    git tag -asm "v1.2.3" v1.2.3
    git push --tags
  4. The tag will trigger a GitHub Action Workflow.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages