abieos-python
Python bindings for abieos library. Implements Binary <> JSON conversion of EOS action data using ABIs.
Building
Prerequisites
abieos C++ library depends on a recent version of CMake (>=3.11) and GCC8. Please make sure these are available in your system.
Statically linked
This is the most comfortable to use, as we can just package the library as a wheel file and ship it. Patch to CMakeLists.txt is required to be able to build abieos as a static library.
First you need to build abieos library itself:
$ git submodule update --init-recursive
$ mkdir external/abieos/build
$ cd external/abieos/build
$ cmake ..
$ make
Then you can simply build the package using setuptools.
$ python setup.py build --static
Dynamically linked
If you really want to dynamically link the bindings to the version of abieos installed on your system, you also can. At the time of writing these instructions (24.02.2020), EOSIO does not release a binary packages for any OS nor even supports installing the built library using make command. Assuming you've built the library and copied it manually into correct paths, you can simply build the bindings using setuptools.
$ python setup.py build
Running tests
When running tests you can run into problems because a version without C extensions will be used. As a workaround, you can copy the built file to abieos/:
cp build/lib.*/abieos/_private* abieos # workaround
flake8
mypy
pytest
Usage
If you're running Python on Linux or macOS, you can skip building and use a wheel instead.
$ pip install abieos-python
It is recommended to use EosAbiSerializer class if possible, but if your use case requires access the original abieos API, it is available under abieos.private.
With ABI in binary format (bytes)
from abieos import EosAbiSerializer
s = EosAbiSerializer()
s.set_abi_from_bin('eosio.token', abi)
With ABI in hex format (str)
from abieos import EosAbiSerializer
s = EosAbiSerializer()
s.set_abi_from_hex('eosio.token', abi)
With ABI in JSON format (dict)
from abieos import EosAbiSerializer
s = EosAbiSerializer()
s.set_abi_from_json('eosio.token', abi)
dict -> bytes
s.json_to_bin(
'eosio.token',
s.get_type_for_action('eosio.token', 'transfer'),
{
'from': 'useraaaaaaaa',
'to': 'useraaaaaaab',
'quantity': '0.0001 SYS',
'memo': '',
}
)
dict -> hex string
s.json_to_hex(
'eosio.token',
s.get_type_for_action('eosio.token', 'transfer'),
{
'from': 'useraaaaaaaa',
'to': 'useraaaaaaab',
'quantity': '0.0001 SYS',
'memo': '',
}
)
bytes -> dict
s.bin_to_json(
'eosio.token',
s.get_type_for_action('eosio.token', 'transfer'),
b'`\x8c1\xc6\x18s\x15\xd6p\x8c1\xc6\x18s\x15\xd6\x01\x00\x00\x00\x00'
b'\x00\x00\x00\x04SYS\x00\x00\x00\x00\x00'
)
hex string -> dict
s.hex_to_json(
'eosio.token',
s.get_type_for_action('eosio.token', 'transfer'),
'608C31C6187315D6708C31C6187315D60100000000000000045359530000000000'
)
With custom JSON encoder/decoder
from abieos import EosAbiSerializer
s = EosAbiSerializer(loads=simplejson.loads, dumps=simplejson.dumps)
Metadata
Release files for abieos-python 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| abieos-python-1.0.0.macosx-10.13-x86_64.tar.gz | 141.8 kB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| abieos_python-1.0.0-cp38-cp38-manylinux2010_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.12+ x86-64 | Details |
| abieos_python-1.0.0-cp38-cp38-macosx_10_13_x86_64.whl | CPython 3.8 | CPython 3.8 | macOS 10.13+ x86-64 | Details |
| abieos_python-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| abieos_python-1.0.0-cp37-cp37m-macosx_10_13_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.13+ x86-64 | Details |
| abieos_python-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| abieos_python-1.0.0-cp36-cp36m-macosx_10_13_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | macOS 10.13+ x86-64 | Details |
Total release size: 1.2 MB
Release files / abieos-python-1.0.0.macosx-10.13-x86_64.tar.gz
| Download URL | abieos-python-1.0.0.macosx-10.13-x86_64.tar.gz |
|---|---|
| Size | 141.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1217761e931a6c4642b69488db3f0ba34e0d93a48bb4715d8c2a158c083ede80
|
|
BLAKE2b-256 checksum How to use checksums |
ff37ac758de1b3894be389aa58cbd2af7863fc95abb4135b999485c5ebcc5d64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / abieos_python-1.0.0-cp38-cp38-manylinux2010_x86_64.whl
| Download URL | abieos_python-1.0.0-cp38-cp38-manylinux2010_x86_64.whl |
|---|---|
| Size | 217.3 kB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
bc7da3ec4be7b13f49d7d77be44ae26b4502df000cbdbbdb4ac89f930a4216b0
|
|
BLAKE2b-256 checksum How to use checksums |
78d85320ad873e5f05964cd1eea37ad19faf52f627c67b10879f34aa996d5185
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / abieos_python-1.0.0-cp38-cp38-macosx_10_13_x86_64.whl
| Download URL | abieos_python-1.0.0-cp38-cp38-macosx_10_13_x86_64.whl |
|---|---|
| Size | 141.4 kB |
| Tags | CPython 3.8 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
9eae593b6a01a031fce0f504dd4cf81a5d1cc745bfa5d7cf5415190a7f821d37
|
|
BLAKE2b-256 checksum How to use checksums |
f24733c8aef5a1655d1ad8b83c88aa518a5dfdbfc650853b5a1f864952560e1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / abieos_python-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl
| Download URL | abieos_python-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl |
|---|---|
| Size | 218.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6ef0cf415ea56eecb23c3b4679011e03f6abb4356d02860c87fb6de85ce115b9
|
|
BLAKE2b-256 checksum How to use checksums |
cc2b15c9282db973e72a3a4be686c39190389bed97fd0e554c328bdfd24e3e89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / abieos_python-1.0.0-cp37-cp37m-macosx_10_13_x86_64.whl
| Download URL | abieos_python-1.0.0-cp37-cp37m-macosx_10_13_x86_64.whl |
|---|---|
| Size | 141.4 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a34b5e46495867b999100f93de7aac5d883624441e57a43bf1f3c07fdfe9d3c
|
|
BLAKE2b-256 checksum How to use checksums |
5bcc94ea49818c1ea01560e88783a578843828a11093380bbbe6c24f1703cc81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / abieos_python-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl
| Download URL | abieos_python-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl |
|---|---|
| Size | 217.4 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
47448f66452f0ebee667ca873b0ad743cd42f858bd0358ab12070d3341b72b11
|
|
BLAKE2b-256 checksum How to use checksums |
9a9fc634d7f3f5121143066bf13ba5047ac5836ba89e7d156943e0f7375f9a7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / abieos_python-1.0.0-cp36-cp36m-macosx_10_13_x86_64.whl
| Download URL | abieos_python-1.0.0-cp36-cp36m-macosx_10_13_x86_64.whl |
|---|---|
| Size | 141.4 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
40da91a728d83b0ddd6c540741c75b63c7cfa2489fa78a673f652685eee88da8
|
|
BLAKE2b-256 checksum How to use checksums |
e6e6bf373e82c29bbbd8c47813d9266413946ccc4ea0f91f579b174ee37267f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Security for abieos-python 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.