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.1.tar.gz
(1.0 MB
view hashes)
Built Distributions
Close
Hashes for mixin_python-0.2.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516d4d0d0a2f2da30c979cb83a462dc634ee65ee97a5cee6a8826a81dce6adab |
|
MD5 | 8ae246f306e2067a53bb4e27e54d5eff |
|
BLAKE2b-256 | 807523673306e4e4cc97318b96d8e09434b1e7e33599371de85eb50120050bee |
Close
Hashes for mixin_python-0.2.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e3bcf7fcadb0ee3d15fc3630bb9e2aef07eb416212374893f597e344a6c7274 |
|
MD5 | 7ef173eb870918bb170547f4b17e280d |
|
BLAKE2b-256 | 7d2c474330a72ac89ecdedb701f779786e1265e136e479b2d89ee87749207f0c |
Close
Hashes for mixin_python-0.2.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f09cb91842af9f44d8369669b3ee11980c1ca1258a0f6184c7140f585c440ab |
|
MD5 | 2bb13df9b1eb2af5feb002bb3191658a |
|
BLAKE2b-256 | 30fe62cdd9c00f762f20432474445c7534711ab8bfa088b9db12dca7981cd3bc |
Close
Hashes for mixin_python-0.2.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaeeb36c4019b908a3dbe995a9ef44c415c5dca6ddc821ee5e62fc462a171ef6 |
|
MD5 | b213cb0371a936ddbc33801db0c21cdd |
|
BLAKE2b-256 | 947a251b8f31b6d5fa1d7e4de7760a21d32c50f926a700c7cb83a18fc6190eb0 |
Close
Hashes for mixin_python-0.2.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 983ff4e63c383663a4c6631eccbc40e464fec8642b973f6730fe93e4e92182be |
|
MD5 | 16d10aa00ccf5532b18e141a7e8363b1 |
|
BLAKE2b-256 | 8d4e6723136a699198e82b91c991bf1b5f38d41c10630ac5db81cd44c431b747 |
Close
Hashes for mixin_python-0.2.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f158a8b67f374c5b4b059b6a6f208557d537deacfdeed1618398935f0a8788b |
|
MD5 | 1576c12fafe46d2e9cc74033027758d9 |
|
BLAKE2b-256 | b1c4cfed48955b4f19f71f1e2bb0fd8e7a783da874e068ad6b0663644881304a |
Close
Hashes for mixin_python-0.2.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4303f3aa86aa44b18c9f9f80368d85a04c06d5529870e8b073527199c655bb1 |
|
MD5 | 3a7578de3e2d806366ec2a759e2a9312 |
|
BLAKE2b-256 | d1ede77bba18b1f32d257eb8b2ba7c9b337f5f93ee81b401106afee408945a5c |
Close
Hashes for mixin_python-0.2.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe1199aa37c2b79acf937225d223a131e214d128e4f44e4b9f871fb02b255022 |
|
MD5 | 761e69f7d069428c58266f25af265f19 |
|
BLAKE2b-256 | 5567b9b3d98bcdfcadde6845afb99b6f05f49b36fb247f68fb005e8e5e4e5aed |
Close
Hashes for mixin_python-0.2.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e6357eaf96181938efdfba4e8c3f0ffe33d348b990c4813ba5313e443783fe |
|
MD5 | 3545c87f2d26dfd290ed7be4c99ff612 |
|
BLAKE2b-256 | 2058ae507eafaddac3aeb6f40b43c7ecdf0ff6673291c7f3b05f237656505596 |