Python Toolkit for AMAX
[](https://pypi.org/project/pyamaxkit)
[](https://pypi.org/project/pyamaxkit)
# Installation
## On Linux platform
```bash
python3 -m pip install -U pip
python3 -m pip install pyamaxkit
```
## On Windows platform:
```bash
python -m pip install -U pip
python -m pip install pyamaxkit
```
## On Apple M1 hardware
pyamaxkit does not have pre-built versions available for ARM chips. In order to build it from source code, you need to install `cmake`, `go`, `scikit-build`, `cython`.
```bash
brew install go
brew install cython
xcode-select --install
python3 -m pip install -U pip
python3 -m pip install cmake
python3 -m pip install scikit-build
python3 -m pip install pyamaxkit
```
# Code Examples
## Example1
```python
import os
from pyamaxkit import amaxapi, wallet
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
amaxapi.set_node('https://chain.amaxtest.com')
info = amaxapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.00000000 AMAX',
'memo': 'hello world'
}
amaxapi.push_action('amax.token', 'transfer', args, {'test1':'active'})
```
## Async Example
```python
import os
import asyncio
from pyamaxkit import wallet
from pyamaxkit.chainapi import ChainApiAsync
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
async def test():
amaxapi = ChainApiAsync('https://chain.amaxtest.com')
info = await amaxapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.00000000 AMAX',
'memo': 'hello world'
}
r = await amaxapi.push_action('amax.token', 'transfer', args, {'test1':'active'})
print(r)
asyncio.run(test())
```
## Sign With Ledger Hardware Wallet Example
```python
import os
from pyamaxkit import amaxapi
amaxapi.set_node('https://chain.amaxtest.com')
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.00000000 AMAX',
'memo': 'hello world'
}
#indices is an array of ledger signing key indices
amaxapi.push_action('amax.token', 'transfer', args, {'test1':'active'}, indices=[0])
```
# [Docs](https://github.com/AMAX-DAO-DEV/pyamaxkit/#/MODULES?id=pyeoskit-modules)
# Building from Source Code
### Installing Prerequisites
Install the build dependencies:
```
python3 -m pip install scikit-build
python3 -m pip install cython
```
Install the [Go compiler](https://golang.org/doc/install#download) and `cmake`
with your system package manager so that the CGo components can be compiled.
You will also need a C compiler such as ``gcc``. On Debian based systems run
``sudo apt-get install build-essential``. When targeting a different
architecture install the matching cross compiler (for example
``gcc-aarch64-linux-gnu``) and set ``GOARCH`` and ``CC`` accordingly, e.g.:
```bash
export GOARCH=arm64
export CC=aarch64-linux-gnu-gcc
```
For Windows platform
```
python -m pip install scikit-build
python -m pip install cython
```
1. Download and Install gcc compiler from [tdm-gcc](https://jmeubank.github.io/tdm-gcc)
2. Install Go compiler from [download](https://golang.org/doc/install#download)
3. Install cmake from [download](https://cmake.org/download)
4. Install python3 from [downloads](https://www.python.org/downloads/windows/)
Press Win+R to open Run Dialog, input the following command
```
cmd -k /path/to/gcc/mingwvars.bat
```
### Downloading Source Code
```
git clone https://www.github.com/AMAX-DAO-DEV/pyamaxkit
cd pyamaxkit
git submodule update --init --recursive
```
### Build
```
./build.sh
```
For Windows platform, in the cmd dialog, enter the following command:
```
python setup.py sdist bdist_wheel
```
### Installation
```
./install.sh
```
For Windows platform
```
python -m pip uninstall pyamaxkit -y;python -m pip install .\dist\pyamaxkit-[SUFFIX].whl
```
### Publishing to PyPI
Use the helper script to build and upload the package. Set `PYPI_TOKEN` with your
API token and optionally `PYPI_REPOSITORY` (defaults to `pypi`). The script
installs build requirements such as `scikit-build` and `Cython` automatically.
```bash
python3 scripts/publish_pypi.py
```
### License
[MIT](./LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/AMAX-DAO-DEV/pyamaxkit",
"name": "pyamaxkit",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "learnforpractice",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/63/b1/06f545309172474bf7894272d4b105c5fa63c00e35badf3b31c299a479a8/pyamaxkit-1.0.4.tar.gz",
"platform": null,
"description": "Python Toolkit for AMAX\n\n[](https://pypi.org/project/pyamaxkit)\n[](https://pypi.org/project/pyamaxkit)\n\n# Installation\n\n## On Linux platform\n\n```bash\npython3 -m pip install -U pip\npython3 -m pip install pyamaxkit\n```\n\n## On Windows platform:\n\n```bash\npython -m pip install -U pip\npython -m pip install pyamaxkit\n```\n\n## On Apple M1 hardware\n\npyamaxkit does not have pre-built versions available for ARM chips. In order to build it from source code, you need to install `cmake`, `go`, `scikit-build`, `cython`.\n\n```bash\nbrew install go\nbrew install cython\nxcode-select --install\npython3 -m pip install -U pip\npython3 -m pip install cmake\npython3 -m pip install scikit-build\npython3 -m pip install pyamaxkit\n```\n\n# Code Examples\n\n## Example1\n```python\nimport os\nfrom pyamaxkit import amaxapi, wallet\n#import your account private key here\nwallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')\n\namaxapi.set_node('https://chain.amaxtest.com')\ninfo = amaxapi.get_info()\nprint(info)\nargs = {\n 'from': 'test1',\n 'to': 'test2',\n 'quantity': '1.00000000 AMAX',\n 'memo': 'hello world'\n}\namaxapi.push_action('amax.token', 'transfer', args, {'test1':'active'})\n```\n\n## Async Example\n```python\nimport os\nimport asyncio\nfrom pyamaxkit import wallet\nfrom pyamaxkit.chainapi import ChainApiAsync\n\n#import your account private key here\nwallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')\n\nasync def test():\n amaxapi = ChainApiAsync('https://chain.amaxtest.com')\n info = await amaxapi.get_info()\n print(info)\n args = {\n 'from': 'test1',\n 'to': 'test2',\n 'quantity': '1.00000000 AMAX',\n 'memo': 'hello world'\n }\n r = await amaxapi.push_action('amax.token', 'transfer', args, {'test1':'active'})\n print(r)\n\nasyncio.run(test())\n```\n\n## Sign With Ledger Hardware Wallet Example\n```python\nimport os\nfrom pyamaxkit import amaxapi\namaxapi.set_node('https://chain.amaxtest.com')\nargs = {\n 'from': 'test1',\n 'to': 'test2',\n 'quantity': '1.00000000 AMAX',\n 'memo': 'hello world'\n}\n\n#indices is an array of ledger signing key indices\namaxapi.push_action('amax.token', 'transfer', args, {'test1':'active'}, indices=[0])\n```\n\n\n\n\n# [Docs](https://github.com/AMAX-DAO-DEV/pyamaxkit/#/MODULES?id=pyeoskit-modules)\n\n# Building from Source Code\n\n### Installing Prerequisites\n\nInstall the build dependencies:\n\n```\npython3 -m pip install scikit-build\npython3 -m pip install cython\n```\n\nInstall the [Go compiler](https://golang.org/doc/install#download) and `cmake`\nwith your system package manager so that the CGo components can be compiled.\nYou will also need a C compiler such as ``gcc``. On Debian based systems run\n``sudo apt-get install build-essential``. When targeting a different\narchitecture install the matching cross compiler (for example\n``gcc-aarch64-linux-gnu``) and set ``GOARCH`` and ``CC`` accordingly, e.g.:\n\n```bash\nexport GOARCH=arm64\nexport CC=aarch64-linux-gnu-gcc\n```\n\nFor Windows platform\n\n```\npython -m pip install scikit-build\npython -m pip install cython\n```\n\n1. Download and Install gcc compiler from [tdm-gcc](https://jmeubank.github.io/tdm-gcc)\n2. Install Go compiler from [download](https://golang.org/doc/install#download)\n3. Install cmake from [download](https://cmake.org/download)\n4. Install python3 from [downloads](https://www.python.org/downloads/windows/)\n\nPress Win+R to open Run Dialog, input the following command\n```\ncmd -k /path/to/gcc/mingwvars.bat\n```\n\n### Downloading Source Code\n\n```\ngit clone https://www.github.com/AMAX-DAO-DEV/pyamaxkit\ncd pyamaxkit\ngit submodule update --init --recursive\n```\n\n### Build\n```\n./build.sh\n```\n\nFor Windows platform, in the cmd dialog, enter the following command:\n```\npython setup.py sdist bdist_wheel\n```\n\n### Installation\n\n```\n./install.sh\n```\n\nFor Windows platform\n```\npython -m pip uninstall pyamaxkit -y;python -m pip install .\\dist\\pyamaxkit-[SUFFIX].whl\n```\n\n\n### Publishing to PyPI\n\nUse the helper script to build and upload the package. Set `PYPI_TOKEN` with your\nAPI token and optionally `PYPI_REPOSITORY` (defaults to `pypi`). The script\ninstalls build requirements such as `scikit-build` and `Cython` automatically.\n\n```bash\npython3 scripts/publish_pypi.py\n```\n\n### License\n[MIT](./LICENSE)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python Toolkit for EOS",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://github.com/AMAX-DAO-DEV/pyamaxkit"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a56e4fadf801b0813933c302c9ed9d8a7ca6b50230abf8727dc649e78e02aa0a",
"md5": "d9f2b0b0bb056ea5a6231b4da53b0d1d",
"sha256": "5822fc829821f7628285d281eaa7cec4fa14f2c8e3e6b4c582a90047c525de34"
},
"downloads": -1,
"filename": "pyamaxkit-1.0.4-cp38-cp38-manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "d9f2b0b0bb056ea5a6231b4da53b0d1d",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 609230,
"upload_time": "2025-07-09T03:45:21",
"upload_time_iso_8601": "2025-07-09T03:45:21.251541Z",
"url": "https://files.pythonhosted.org/packages/a5/6e/4fadf801b0813933c302c9ed9d8a7ca6b50230abf8727dc649e78e02aa0a/pyamaxkit-1.0.4-cp38-cp38-manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1869a483dc7bb0c6f2e75e95a95c46d1bf2954877330fa5274a9176348f02e0c",
"md5": "ce9dbc3171a139d0df42ab3827e914f5",
"sha256": "78ea9d8526d115ac008f1bcd72563a2311e38eb964eee018ae5e2b03ddd9cf22"
},
"downloads": -1,
"filename": "pyamaxkit-1.0.4-cp39-cp39-macosx_10_16_x86_64.whl",
"has_sig": false,
"md5_digest": "ce9dbc3171a139d0df42ab3827e914f5",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 4361086,
"upload_time": "2025-07-09T03:47:19",
"upload_time_iso_8601": "2025-07-09T03:47:19.705457Z",
"url": "https://files.pythonhosted.org/packages/18/69/a483dc7bb0c6f2e75e95a95c46d1bf2954877330fa5274a9176348f02e0c/pyamaxkit-1.0.4-cp39-cp39-macosx_10_16_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "63b106f545309172474bf7894272d4b105c5fa63c00e35badf3b31c299a479a8",
"md5": "a95f3441e6147c4cbeda6a9fe98d9b91",
"sha256": "7a5e9a71f9c98de9d08b592c779b00c2874fa21e4f119afcd4bbb955cdf8efe9"
},
"downloads": -1,
"filename": "pyamaxkit-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "a95f3441e6147c4cbeda6a9fe98d9b91",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3773404,
"upload_time": "2025-07-09T03:46:11",
"upload_time_iso_8601": "2025-07-09T03:46:11.155921Z",
"url": "https://files.pythonhosted.org/packages/63/b1/06f545309172474bf7894272d4b105c5fa63c00e35badf3b31c299a479a8/pyamaxkit-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 03:46:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AMAX-DAO-DEV",
"github_project": "pyamaxkit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "scikit-build",
"specs": []
}
],
"lcname": "pyamaxkit"
}