Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #237 from iotaledger/release/2.0.9
Browse files Browse the repository at this point in the history
PyOTA v2.0.9
  • Loading branch information
lzpap authored Oct 1, 2019
2 parents cc22622 + 1418ea2 commit b1368af
Show file tree
Hide file tree
Showing 24 changed files with 1,579 additions and 966 deletions.
20 changes: 8 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ If you want to get involved in the community, need help with getting setup,
have any issues related with the library or just want to discuss Blockchain,
Distributed Ledgers and IoT with other people, feel free to join our `Discord`_.

You can also ask questions on our `dedicated forum`_.

If you encounter any issues while using PyOTA, please report them using the
`PyOTA Bug Tracker`_.

Expand Down Expand Up @@ -61,14 +59,14 @@ To run unit tests after installing from source::
PyOTA is also compatible with `tox`_, which will run the unit tests in different
virtual environments (one for each supported version of Python).

To run the unit tests, it is recommended that you use the `detox`_ library.
detox speeds up the tests by running them in parallel.
To run the unit tests, it is recommended that you use the ``-p`` argument.
This speeds up the tests by running them in parallel.

Install PyOTA with the ``test-runner`` extra to set up the necessary
dependencies, and then you can run the tests with the ``detox`` command::
dependencies, and then you can run the tests with the ``tox`` command::

pip install -e .[test-runner]
detox -v
tox -v -p all

=============
Documentation
Expand All @@ -80,14 +78,14 @@ can also build the documentation locally:

#. Install extra dependencies (you only have to do this once)::

pip install '.[docs-builder]'
pip install .[docs-builder]

.. tip::

To install the CCurl extension and the documentation builder tools
together, use the following command::

pip install '.[ccurl,docs-builder]'
pip install .[ccurl,docs-builder]

#. Switch to the ``docs`` directory::

Expand All @@ -98,10 +96,8 @@ can also build the documentation locally:
make html

.. _Create virtualenv: https://realpython.com/blog/python/python-virtual-environments-a-primer/
.. _Discord: https://discord.gg/7Gu2mG5
.. _Discord: https://discord.iota.org/
.. _PyOTA Bug Tracker: https://github.com/iotaledger/iota.lib.py/issues
.. _ReadTheDocs: https://pyota.readthedocs.io/
.. _dedicated forum: https://forum.iota.org/
.. _detox: https://pypi.python.org/pypi/detox
.. _official API: https://iota.readme.io/
.. _official API: https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference
.. _tox: https://tox.readthedocs.io/
6 changes: 3 additions & 3 deletions docs/addresses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ Using AddressGenerator
generator = AddressGenerator(b'SEED9GOES9HERE')
# Generate a list of addresses:
addresses = generator.get_addresses(index=0, count=5)
addresses = generator.get_addresses(start=0, count=5)
# Generate a list of addresses in reverse order:
addresses = generator.get_addresses(index=42, count=10, step=-1)
addresses = generator.get_addresses(start=42, count=10, step=-1)
# Create an iterator, advancing 5 indices each iteration.
iterator = generator.create_iterator(index=86, step=5)
iterator = generator.create_iterator(start=86, step=5)
for address in iterator:
...
Expand Down
37 changes: 36 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ These methods are "low level" and generally do not need to be called
directly.

For the full documentation of all the Core API calls, please refer
to the `official documentation <https://iota.readme.io/>`__.
to the `official documentation <https://docs.iota.org/docs/node-software/0.1/
iri/references/api-reference>`__.

Extended API
============
Expand All @@ -36,6 +37,40 @@ This method returns a ``dict`` with the following items:
broadcast/stored. Should be the same as the value of the ``trytes``
parameter.


``find_transaction_objects``
----------------------------

A more extensive version of the core API ``find_transactions`` that returns
transaction objects instead of hashes.

Effectively, this is ``find_transactions`` + ``get_trytes`` + converting
the trytes into transaction objects. It accepts the same parameters
as ``find_transactions``

Find the transactions which match the specified input.
All input values are lists, for which a list of return values
(transaction hashes), in the same order, is returned for all
individual elements. Using multiple of these input fields returns the
intersection of the values.

Parameters
~~~~~~~~~~

- ``bundles: Optional[Iterable[BundleHash]]``: List of bundle IDs.
- ``addresses: Optional[Iterable[Address]]``: List of addresses.
- ``tags: Optional[Iterable[Tag]]``: List of tags.
- ``param: Optional[Iterable[TransactionHash]]``: List of approvee
transaction IDs.

Return
~~~~~~

This method returns a ``dict`` with the following items:

- ``transactions: List[Transaction]``: List of Transaction objects that
match the input

``get_account_data``
--------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Installation
============
PyOTA is compatible with Python 3.6, 3.5 and 2.7.
PyOTA is compatible with Python 3.7, 3.6, 3.5 and 2.7.

Install PyOTA using `pip`:

Expand Down Expand Up @@ -76,7 +76,7 @@ your API requests so that they contain the necessary authentication metadata.
)
.. _forum: https://forum.iota.org/
.. _official api: https://iota.readme.io/
.. _official api: https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference
.. _pyota-ccurl extension: https://pypi.python.org/pypi/PyOTA-CCurl
.. _run your own node.: http://iotasupport.com/headlessnode.shtml
.. _slack: http://slack.iota.org/
Expand Down
Loading

0 comments on commit b1368af

Please sign in to comment.