Python Toolkit for EOS
[![PyPi](https://img.shields.io/pypi/v/pyeoskit.svg)](https://pypi.org/project/pyeoskit)
[![PyPi](https://img.shields.io/pypi/dm/pyeoskit.svg)](https://pypi.org/project/pyeoskit)
# Installation
## On Linux platform
```bash
python3 -m pip install -U pip
python3 -m pip install pyeoskit
```
## On Windows platform:
```bash
python -m pip install -U pip
python -m pip install pyeoskit
```
## On Apple M1 hardware
pyeoskit 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 pyeoskit
```
# Code Examples
## Example1
```python
import os
from pyeoskit import eosapi, wallet
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
eosapi.set_node('https://eos.greymass.com')
info = eosapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'})
```
## Async Example
```python
import os
import asyncio
from pyeoskit import wallet
from pyeoskit.chainapi import ChainApiAsync
#import your account private key here
wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')
async def test():
eosapi = ChainApiAsync('https://eos.greymass.com')
info = await eosapi.get_info()
print(info)
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
r = await eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'})
print(r)
asyncio.run(test())
```
## Sign With Ledger Hardware Wallet Example
```python
import os
from pyeoskit import eosapi
eosapi.set_node('https://eos.greymass.com')
args = {
'from': 'test1',
'to': 'test2',
'quantity': '1.0000 EOS',
'memo': 'hello,world'
}
#indices is an array of ledger signing key indices
eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}, indices=[0])
```
# [Docs](https://learnforpractice.github.io/pyeoskit/#/MODULES?id=pyeoskit-modules)
# Building from Source Code
### Installing Prerequisites
```
python3 -m pip install scikit-build
python3 -m pip install cython
```
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/learnforpractice/pyeoskit
cd pyeoskit
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 pyeoskit -y;python -m pip install .\dist\pyeoskit-[SUFFIX].whl
```
### License
[MIT](./LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/learnforpractice/pyeoskit",
"name": "pyeoskit",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "learnforpractice",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/08/8f/e0cd654cf3eb376923cce7f699729819d28cce3a312f59f2d827d871275f/pyeoskit-1.1.12.tar.gz",
"platform": null,
"description": "Python Toolkit for EOS\n\n[![PyPi](https://img.shields.io/pypi/v/pyeoskit.svg)](https://pypi.org/project/pyeoskit)\n[![PyPi](https://img.shields.io/pypi/dm/pyeoskit.svg)](https://pypi.org/project/pyeoskit)\n\n# Installation\n\n## On Linux platform\n\n```bash\npython3 -m pip install -U pip\npython3 -m pip install pyeoskit\n```\n\n## On Windows platform:\n\n```bash\npython -m pip install -U pip\npython -m pip install pyeoskit\n```\n\n## On Apple M1 hardware\n\npyeoskit 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 pyeoskit\n```\n\n# Code Examples\n\n## Example1\n```python\nimport os\nfrom pyeoskit import eosapi, wallet\n#import your account private key here\nwallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')\n\neosapi.set_node('https://eos.greymass.com')\ninfo = eosapi.get_info()\nprint(info)\nargs = {\n 'from': 'test1',\n 'to': 'test2',\n 'quantity': '1.0000 EOS',\n 'memo': 'hello,world'\n}\neosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'})\n```\n\n## Async Example\n```python\nimport os\nimport asyncio\nfrom pyeoskit import wallet\nfrom pyeoskit.chainapi import ChainApiAsync\n\n#import your account private key here\nwallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p')\n\nasync def test():\n eosapi = ChainApiAsync('https://eos.greymass.com')\n info = await eosapi.get_info()\n print(info)\n args = {\n 'from': 'test1',\n 'to': 'test2',\n 'quantity': '1.0000 EOS',\n 'memo': 'hello,world'\n }\n r = await eosapi.push_action('eosio.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 pyeoskit import eosapi\neosapi.set_node('https://eos.greymass.com')\nargs = {\n 'from': 'test1',\n 'to': 'test2',\n 'quantity': '1.0000 EOS',\n 'memo': 'hello,world'\n}\n\n#indices is an array of ledger signing key indices\neosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}, indices=[0])\n```\n\n\n\n\n# [Docs](https://learnforpractice.github.io/pyeoskit/#/MODULES?id=pyeoskit-modules)\n\n# Building from Source Code\n\n### Installing Prerequisites\n\n```\npython3 -m pip install scikit-build\npython3 -m pip install cython\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/learnforpractice/pyeoskit\ncd pyeoskit\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 pyeoskit -y;python -m pip install .\\dist\\pyeoskit-[SUFFIX].whl\n```\n\n### License\n[MIT](./LICENSE)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python Toolkit for EOS",
"version": "1.1.12",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e2a8693ca7faf67d100114bebfde10cfb6b531bd7aae54fdbaa1d81402e09ae4",
"md5": "1479651ce9476b186f5b92ea28502acd",
"sha256": "7c1e1f5008651fc541c854d85f3afbb9a007a921addb38628e5f4b41fd813855"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp310-cp310-macosx_10_15_x86_64.whl",
"has_sig": false,
"md5_digest": "1479651ce9476b186f5b92ea28502acd",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 2036960,
"upload_time": "2023-03-14T01:44:44",
"upload_time_iso_8601": "2023-03-14T01:44:44.854732Z",
"url": "https://files.pythonhosted.org/packages/e2/a8/693ca7faf67d100114bebfde10cfb6b531bd7aae54fdbaa1d81402e09ae4/pyeoskit-1.1.12-cp310-cp310-macosx_10_15_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fc4ac182d6659cccfc6076f7aec71234010e8305775cbbca124df7109aa22821",
"md5": "c459de039588833d76a9636a93e11c89",
"sha256": "6afeb92369c74ed215566446a360205f33314b10aaff9829ba418894b272de46"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "c459de039588833d76a9636a93e11c89",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 3298356,
"upload_time": "2023-03-14T01:44:46",
"upload_time_iso_8601": "2023-03-14T01:44:46.746463Z",
"url": "https://files.pythonhosted.org/packages/fc/4a/c182d6659cccfc6076f7aec71234010e8305775cbbca124df7109aa22821/pyeoskit-1.1.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f9c7bbbd2ecfcdfdf659bd4957bd4646be89f4be6c074d0811c3f24b8961adf1",
"md5": "f89f149eb132da639fba2fdcb1851391",
"sha256": "f3a35b11b59f7f9f65736cb0e3c51aba713e9d98ca8a8ea67b7f6cdf84d4368c"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "f89f149eb132da639fba2fdcb1851391",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 3141487,
"upload_time": "2023-03-14T01:44:49",
"upload_time_iso_8601": "2023-03-14T01:44:49.248641Z",
"url": "https://files.pythonhosted.org/packages/f9/c7/bbbd2ecfcdfdf659bd4957bd4646be89f4be6c074d0811c3f24b8961adf1/pyeoskit-1.1.12-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "35d7e9b2d5b3b47405b171d72e8bef1cffb42fd548448db668b1877f30630222",
"md5": "c0896a465a7d0cd05aa96acee3a228fe",
"sha256": "8a5fc065081abe532ab988138c9be2fc082e9913f784d1d3f121374af7e48f82"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp37-cp37m-macosx_10_15_x86_64.whl",
"has_sig": false,
"md5_digest": "c0896a465a7d0cd05aa96acee3a228fe",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": null,
"size": 2037585,
"upload_time": "2023-03-14T01:44:51",
"upload_time_iso_8601": "2023-03-14T01:44:51.562252Z",
"url": "https://files.pythonhosted.org/packages/35/d7/e9b2d5b3b47405b171d72e8bef1cffb42fd548448db668b1877f30630222/pyeoskit-1.1.12-cp37-cp37m-macosx_10_15_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "793d9d135ed8200021d0723117a56d33084b813a4f534ae842531e5051361a86",
"md5": "df8253f8bd22cd1b3e72cd973c615da5",
"sha256": "7872feb7a805d11128ab067a0e9a480183e2588fe2fd1a12acb332e8bf2504aa"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "df8253f8bd22cd1b3e72cd973c615da5",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": null,
"size": 3297580,
"upload_time": "2023-03-14T01:44:53",
"upload_time_iso_8601": "2023-03-14T01:44:53.853232Z",
"url": "https://files.pythonhosted.org/packages/79/3d/9d135ed8200021d0723117a56d33084b813a4f534ae842531e5051361a86/pyeoskit-1.1.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a439285cc3ab9e46b5c4b77f664df002e6e6d1a52c14cb6865503bd6d716f506",
"md5": "57b5f9b9cb70230f79c142ed7db9e4b2",
"sha256": "abe471c568d90fead5e7723d6b708ecb8e60b6ad95a5658e3911afd6f9ed8617"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp37-cp37m-win_amd64.whl",
"has_sig": false,
"md5_digest": "57b5f9b9cb70230f79c142ed7db9e4b2",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": null,
"size": 3142624,
"upload_time": "2023-03-14T01:44:55",
"upload_time_iso_8601": "2023-03-14T01:44:55.517644Z",
"url": "https://files.pythonhosted.org/packages/a4/39/285cc3ab9e46b5c4b77f664df002e6e6d1a52c14cb6865503bd6d716f506/pyeoskit-1.1.12-cp37-cp37m-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0aa951edc9525ff9b0921f3bfd37422f5da95084d5eace5ee129bc694efa5829",
"md5": "52f4f7b38b873df4f7dbebe86d586523",
"sha256": "03270e4d77c8c36c5fd34331ac85516d0f7a637b65b459efcaaca80672beb9b5"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp38-cp38-macosx_10_15_x86_64.whl",
"has_sig": false,
"md5_digest": "52f4f7b38b873df4f7dbebe86d586523",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 2037918,
"upload_time": "2023-03-14T01:44:57",
"upload_time_iso_8601": "2023-03-14T01:44:57.270318Z",
"url": "https://files.pythonhosted.org/packages/0a/a9/51edc9525ff9b0921f3bfd37422f5da95084d5eace5ee129bc694efa5829/pyeoskit-1.1.12-cp38-cp38-macosx_10_15_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f701952281c53e488f3e42021f5b31a35b6e4d4b8e6b3174ae0eaa6de18cfacd",
"md5": "11245922aab59eb2de98af58d987d3e0",
"sha256": "5d2492ca1226505a4b08b1f8d4ee6cdae3682c1a46564fa5131085c2978c26da"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "11245922aab59eb2de98af58d987d3e0",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 3298632,
"upload_time": "2023-03-14T01:44:58",
"upload_time_iso_8601": "2023-03-14T01:44:58.878694Z",
"url": "https://files.pythonhosted.org/packages/f7/01/952281c53e488f3e42021f5b31a35b6e4d4b8e6b3174ae0eaa6de18cfacd/pyeoskit-1.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "167b0c119e6c9cbe0248e0744f165e13bfc98e714bbfb6a9286c699ba7824910",
"md5": "7b5eb47745b63c30bca16c8de260a298",
"sha256": "d7459cd4ec8b9edc118bf5e83fe552acfbdd62d0c8e2b8852185938c8db5d2db"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp38-cp38-win_amd64.whl",
"has_sig": false,
"md5_digest": "7b5eb47745b63c30bca16c8de260a298",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 3142701,
"upload_time": "2023-03-14T01:45:01",
"upload_time_iso_8601": "2023-03-14T01:45:01.222519Z",
"url": "https://files.pythonhosted.org/packages/16/7b/0c119e6c9cbe0248e0744f165e13bfc98e714bbfb6a9286c699ba7824910/pyeoskit-1.1.12-cp38-cp38-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "145d983e5705ef3fbdbef6f09e7f1ff465341b9e42dd7c58c319bdffbfdf98b3",
"md5": "33e2e582db3bf6d790afb851eccc8f62",
"sha256": "2ded06c7940f63bbddcd0fe548ba11f1605018e1f8b4f112ab30784b31881879"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp39-cp39-macosx_10_15_x86_64.whl",
"has_sig": false,
"md5_digest": "33e2e582db3bf6d790afb851eccc8f62",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 2038123,
"upload_time": "2023-03-14T01:45:02",
"upload_time_iso_8601": "2023-03-14T01:45:02.646469Z",
"url": "https://files.pythonhosted.org/packages/14/5d/983e5705ef3fbdbef6f09e7f1ff465341b9e42dd7c58c319bdffbfdf98b3/pyeoskit-1.1.12-cp39-cp39-macosx_10_15_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "15cdb8f084308cc6f72d9150527a8c7514443265edfdd1442df24362d301ab6d",
"md5": "e2167c55e4fcc42efcb69a502b37bc6f",
"sha256": "d4a1f1f9196b77d3ed6c0b9db4f3373b468d2e757f16beed2f38237fc6f0766a"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "e2167c55e4fcc42efcb69a502b37bc6f",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 3298600,
"upload_time": "2023-03-14T01:45:03",
"upload_time_iso_8601": "2023-03-14T01:45:03.990146Z",
"url": "https://files.pythonhosted.org/packages/15/cd/b8f084308cc6f72d9150527a8c7514443265edfdd1442df24362d301ab6d/pyeoskit-1.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7ff6738af95f986ad521af4eece8ca191fa779346dce3d5aca08072728d3b17c",
"md5": "a02375a8ad5601bf4c11fae012da07f6",
"sha256": "9f78af92307bacc6aa1dccbb184470a4af4ead53fa68bccf4184126959999ea9"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12-cp39-cp39-win_amd64.whl",
"has_sig": false,
"md5_digest": "a02375a8ad5601bf4c11fae012da07f6",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 3142592,
"upload_time": "2023-03-14T01:45:06",
"upload_time_iso_8601": "2023-03-14T01:45:06.428383Z",
"url": "https://files.pythonhosted.org/packages/7f/f6/738af95f986ad521af4eece8ca191fa779346dce3d5aca08072728d3b17c/pyeoskit-1.1.12-cp39-cp39-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "088fe0cd654cf3eb376923cce7f699729819d28cce3a312f59f2d827d871275f",
"md5": "717d60727f1d7bba2ac4513bc3a8d06a",
"sha256": "d3fa73d088ade904c44f2f0cf18110d08c11eb97953cea41a58538a47b4c3b48"
},
"downloads": -1,
"filename": "pyeoskit-1.1.12.tar.gz",
"has_sig": false,
"md5_digest": "717d60727f1d7bba2ac4513bc3a8d06a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3750766,
"upload_time": "2023-03-14T01:45:08",
"upload_time_iso_8601": "2023-03-14T01:45:08.349898Z",
"url": "https://files.pythonhosted.org/packages/08/8f/e0cd654cf3eb376923cce7f699729819d28cce3a312f59f2d827d871275f/pyeoskit-1.1.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-14 01:45:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "learnforpractice",
"github_project": "pyeoskit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "scikit-build",
"specs": []
}
],
"lcname": "pyeoskit"
}