Skip to main content

python SDK for AERGO

Project description


======
herapy
======

.. image:: https://codecov.io/gh/aergoio/herapy/branch/accounts/graph/badge.svg?token=JylbPsDrDB
:target: https://codecov.io/gh/aergoio/herapy

.. image:: https://img.shields.io/pypi/v/aergo-herapy.svg
:target: https://pypi.python.org/pypi/aergo-herapy

.. image:: https://travis-ci.com/aergoio/herapy.svg?token=bxpJA7kPFExuJMq3sBNb&branch=master
:target: https://travis-ci.com/aergoio/herapy

.. image:: https://readthedocs.org/projects/aergo-herapy/badge/?version=latest
:target: https://aergo-herapy.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://pyup.io/repos/github/aergoio/herapy/shield.svg
:target: https://pyup.io/repos/github/aergoio/herapy/
:alt: Updates

HeraPy is a Python package for AERGO that provides the features below.

--------
Features
--------

* Communication with AERGO node
* Getting AERGO blockchain information
* Creating/Exporting/Importing an account
* Making and sending a transaction
* Deploying/Calling/Querying a smart contract

-------
Install
-------

Install the latest version in `the Python Package Index <https://pypi.org/project/aergo-herapy/>`_

.. code-block::

pip install aergo-herapy

or, install locally

.. code-block::

git clone git@github.com:aergoio/herapy.git
cd herapy
make install

------------
Run examples
------------

After installing aergo-herapy, you can run examples

.. code-block::

make ex

The examples in the 'examples' directory connect the public Aergo testnet.

-----
Build
-----

Downloading HeraPy
==================

Download HeraPy from this repository

.. code-block::

git clone git@github.com:aergoio/herapy.git

Installing Dependencies
=======================

.. code-block::

pip install -r requirements.txt

But, we recommend to use a virtual environment below.

Virtual Environment (Pipenv)
----------------------------

Using Pipenv, all dependencies will be installed automatically.

.. code-block::

pipenv shell

If you cleaned up and setup again,

.. code-block::

pipenv install

If you want to test or contribute, then do not forget '--dev' option

.. code-block::

pipenv install --dev
make test

Updating Protocol
=================

If need to upgrade a protocol,

.. code-block::

make protoc

After this command, all protocol related source files will be generated if it's different.

Updating Aergo Configurations
=============================

If need to upgrade Aergo Configurations,

.. code-block::

make aergo-types

After this command, 'aergo/herapy/obj/aergo_conf.py' will be generated if it's different.

If occur the error message below

.. code-block::

ERROR: Cannot find 'AERGO_TYPES_SRC'

, find the source code 'aergo/config/types.go' and make this file path as an environment variable of 'AERGO_TYPES_SRC'

.. code-block::

export AERGO_TYPES_SRC=`find ~ -path '*/aergo/config/types.go' 2>/dev/null`
make aergo-types


-------------------------
Releases and Contributing
-------------------------

HeraPy follows a major release cycle of AERGO.
A minor release such as fixing bugs and errors are occasionally patched.
Please let us know if you encounter a bug by `filling an issue <https://github.com/aergoio/herapy/issues>`_.

If you are planning to contribute a new feature, class, or function,
please `open an issue <https://github.com/aergoio/herapy/issues>`_ and discuss with us.

We appreciate all contributions.


-------------
Documentation
-------------

https://aergo-herapy.readthedocs.io


-------
License
-------

HeraPy is MIT license as found in the LICENSE file.


-------
Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.11.0 (2019-02-20)
-------------------

* Change the result type from the 'get_tx_result' function ('SmartContractStatus' --> 'TxResultStatus')
* Separate two function 'send_tx' and 'batch_tx' from the single 'send_tx' function for a single and multiple txs
* Open the 'generate_tx' function for helping a new transaction manually
* Support multiple proof queries with the array of Storage Keys
* Simplify verifying proof as the 'verify_proof' function from 'verify_inclusion' and 'verify_exclusion'

0.9.0 (2018-12-31)
------------------

* Fit for the public Aergo testnet.
* First public release on PyPI.


0.1.0 (2018-11-07)
------------------

* First release on PyPI.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aergo-herapy-0.11.0.1.tar.gz (67.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aergo_herapy-0.11.0.1-py3-none-any.whl (61.9 kB view details)

Uploaded Python 3

File details

Details for the file aergo-herapy-0.11.0.1.tar.gz.

File metadata

  • Download URL: aergo-herapy-0.11.0.1.tar.gz
  • Upload date:
  • Size: 67.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for aergo-herapy-0.11.0.1.tar.gz
Algorithm Hash digest
SHA256 ab66dec968e9381218d791853282a39bda42cdc397fb441f0f25810eb4f98a56
MD5 b6fc6f67908dcbbbe3bc84a275920e98
BLAKE2b-256 4df23206ff7aa3b92498791a4e902e1eabd13ea845e1457c9c796f3ace916df8

See more details on using hashes here.

File details

Details for the file aergo_herapy-0.11.0.1-py3-none-any.whl.

File metadata

  • Download URL: aergo_herapy-0.11.0.1-py3-none-any.whl
  • Upload date:
  • Size: 61.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for aergo_herapy-0.11.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56460513c6765ffe2648c7089916b4df2c27b952dbb5f5d228e13a7878dfe5e3
MD5 d3e845ae2beb4a5af849d275646a88ff
BLAKE2b-256 e461d0fa38a913717a0877a6878c8ee86a76a6b831befaae0eea2524fee17a88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page