Mixin Binding Project
Project description
Python Bindings for Mixin
Quick Start
Install mixin-python
pip install mixin-python
Quick Start
import asyncio
from pymixin.mixin_api import MixinApi
api = MixinApi('http://mixin-node0.exinpool.com:8239')
addr = api.create_address()
print(addr)
async def get_info():
info = await api.get_info()
print(info)
asyncio.run(get_info())
{'address': 'XIN9M9T32UhraHpJ9Do4s7FVFeTpery49JB1u6bAcgLe2wY4As918roNTVmbh3GXuuoRLx5FyeuhvUQUmvtWtUthGdgBCdMG',
'view_key': '6396fd4201bbec6f495ded697428003dfd227578174f97e034c94e1abb420d0f',
'spend_key': '02f0ea8504740a1c2916e1b9965c23c242aeeb02d093f3f1ed0e5e0d494bc603'}
Run Mixin from Python
python3 -m pymixin.main kernel --dir config --port 9000
Run a Local Mixin Testnet
python3 tests/start_testnet.py
Connect to Local Testnet
import asyncio
from pymixin.mixin_api import MixinApi
api = MixinApi('http://127.0.0.1:8001')
async def get_info():
info = await api.get_info()
print(info)
asyncio.run(get_info())
Releases
Docs
Install Build Dependencies
clang & go 1.16 & cmake
Ubuntu
sudo apt install python3-dev
sudo apt install python3-pip
sudo apt install clang
sudo apt install cmake
Building
Download Source Code
git clone https://github.com/learnforpractice/mixin-python --recursive
cd mixin-python
python3 -m pip install -r requirements-dev.txt
Update mixin-python Source Code
git pull
git submodule update --init --recursive
Build on Linux
./build-linux.sh
Build on macOS X
./build-mac.sh
Run Tests in Jupyter Notebook
python3 -m pip install notebook
cd notebook
python3 -m notebook
Open helloworld.ipynb, hit Ctrl+Enter to run the test code in cell
Do not forget to run testnet.stop() to stop the testnet, otherwise the testnet processes will still running in the backgroud.
Reference
https://github.com/wenewzhang/mixin-python3-sdk
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mixin-python-0.2.2.tar.gz
(1.0 MB
view hashes)
Built Distributions
Close
Hashes for mixin_python-0.2.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc1920383f0ac115586e7cf3f301f9025271b40e7b35bc95dd4c17cbd480c606 |
|
MD5 | b2f56a481a3fda06c59e86d02c7db01f |
|
BLAKE2b-256 | 68587cc2656d335e00034c7811d02806963c137c325504d6c8002d23ca6ace3e |
Close
Hashes for mixin_python-0.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e26bea8e8e465d77268b67e6ff4ea7fabbe55872f69746cc7288f2aaf67aea1f |
|
MD5 | 297022bb935af9f008dff31a70384cc6 |
|
BLAKE2b-256 | da8bdfb2952b16243f8487780383385c1c5ecce8d301abf1e0a4fc68c3b45d80 |
Close
Hashes for mixin_python-0.2.2-cp39-cp39-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcbc8d6812d5925485090616ac25efcc01780901c2a8adec61a50621ec5a75f4 |
|
MD5 | 78ea9ba220596116f220d3e736b98f56 |
|
BLAKE2b-256 | b59380c95a4f8fd73c8b7f360839f2658abad378209849e7b095d11bc971fff1 |
Close
Hashes for mixin_python-0.2.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a834cb8ab4b5e0ab074ac44a6efc575cf170e7872a6006795fc53f1c7b8af1a0 |
|
MD5 | 3c89f8fdca32dbd14ae2dd4473c76b2f |
|
BLAKE2b-256 | 7d536f0ab3d83ad0a9f3cebed9f3e0ecd58a2ecd99fcf9b16982fc0fd06bf8e4 |
Close
Hashes for mixin_python-0.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b00234acc7b23ded82826975ed2f0253625e5a026397114779ff9a25ee18436a |
|
MD5 | d2614ef63629c4bcc0d0ce14abd514b2 |
|
BLAKE2b-256 | 85de2b10b1dbc85c792794131b3457fa3f368d697738a4a3a0bed7e5450dea38 |
Close
Hashes for mixin_python-0.2.2-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f43f1ec554ff89b6bc34114c0c8706b38413f5de190a046157b9a1fa8f56e35 |
|
MD5 | 7debc1bd854aa77b96e289bb7da56783 |
|
BLAKE2b-256 | 2f8a25833f4d0b4b300946e34f6741c6f9e1523c42ed95fd1e31ed3b21035cf9 |
Close
Hashes for mixin_python-0.2.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0574465a591a8dd8131291cbcfde5599f8d27b9cf21332e92b180f403ba3ec3d |
|
MD5 | ae44395a440542807e4808975a08632c |
|
BLAKE2b-256 | 77c1318ac6de99a66d457d27c6aeec6f69fcf48aae42ab3be2eac310520a73c4 |
Close
Hashes for mixin_python-0.2.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e5977aae4b929169e042dc1f6c1fa8f92ea85919a5540e5da3cf3254a6b86ab |
|
MD5 | b2b025d6720d183bb86b8920ad9cfe45 |
|
BLAKE2b-256 | 80c3dc6c86f024d9d9a36905e39b0a79512a5fa10eb7283e31a9cf7a0a7cb1d3 |
Close
Hashes for mixin_python-0.2.2-cp37-cp37m-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84c786a1a95d53533058e5f1f95a1bd6ecdf46056def3b5513ed527c0e6d6e6a |
|
MD5 | 4252486d8cd59c672f7d27edfba7dbdb |
|
BLAKE2b-256 | 39dfdc35fdcfdb30a269e905798b140d92fa867215efbbc6bf2ba0f3ff03b925 |