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

Commit 2f9d1b0

Browse files
authored
Merge pull request #282 from JakeSCahill/master
Add header to readme with link to documentation portal
2 parents d19729c + 1e691ba commit 2f9d1b0

File tree

5 files changed

+159
-2
lines changed

5 files changed

+159
-2
lines changed

README.md

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<h1 align="center">
2+
<br>
3+
<a href="https://docs.iota.org/docs/client-libraries/0.1/getting-started/python-quickstart"><img src="iota-python.png"></a>
4+
</h1>
5+
6+
<h2 align="center">The official Python client library for interacting with the Tangle</h2>
7+
8+
<p align="center">
9+
<a href="https://docs.iota.org/docs/client-libraries/0.1/getting-started/python-quickstart" style="text-decoration:none;">
10+
<img src="https://img.shields.io/badge/Documentation%20portal-blue.svg?style=for-the-badge"
11+
alt="Developer documentation portal">
12+
</p>
13+
<p align="center">
14+
<a href="http://pyota.readthedocs.io/en/latest/?badge=latest" style="text-decoration:none;"><img src="https://img.shields.io/badge/ReadTheDocs-reference-informational.svg" alt="Auto-generated docs"></a>
15+
<a href="https://discord.iota.org/" style="text-decoration:none;"><img src="https://img.shields.io/badge/Discord-9cf.svg?logo=discord" alt="Discord"></a>
16+
<a href="https://iota.stackexchange.com/" style="text-decoration:none;"><img src="https://img.shields.io/badge/StackExchange-9cf.svg?logo=stackexchange" alt="StackExchange"></a>
17+
<a href="https://github.com/iotaledger/entangled/blob/develop/LICENSE" style="text-decoration:none;"><img src="https://img.shields.io/github/license/iotaledger/iota.py.svg" alt="MIT license"></a>
18+
<a href="https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference" style="text-decoration:none;"><img src="https://img.shields.io/badge/Node%20API%20coverage-18/18%20commands-green.svg" alt="Supported IRI API endpoints"></a>
19+
<a href="https://travis-ci.org/iotaledger/iota.py" style="text-decoration:none;"><img src="https://travis-ci.org/iotaledger/iota.py.svg?branch=master" alt="Build status"></a>
20+
</p>
21+
22+
<p align="center">
23+
<a href="#about">About</a> ◈
24+
<a href="#prerequisites">Prerequisites</a> ◈
25+
<a href="#installation">Installation</a> ◈
26+
<a href="#getting-started">Getting started</a> ◈
27+
<a href="#examples">Examples</a> ◈
28+
<a href="#supporting-the-project">Supporting the project</a> ◈
29+
<a href="#joining-the-discussion">Joining the discussion</a>
30+
</p>
31+
32+
---
33+
34+
## About
35+
36+
This is the **official** Python client library, which allows you to do the following:
37+
* Create transactions
38+
* Read transactions
39+
* Sign transactions
40+
* Generate addresses
41+
42+
This is beta software, so there may be performance and stability issues.
43+
Please report any issues in our [issue tracker](https://github.com/iotaledger/iota.py/issues/new).
44+
45+
## Prerequisites
46+
47+
To install the IOTA Python client library and its dependencies, you need Python version 3.7, 3.6, 3.5, or 2.7 installed on your device.
48+
49+
## Installation
50+
51+
To download the IOTA Python client library and its dependencies, do the following:
52+
53+
```bash
54+
pip install pyota
55+
```
56+
57+
### Installing the optional C extension
58+
59+
PyOTA has an optional C extension that improves the performance of its
60+
cryptography features by an average of **60 times**.
61+
62+
To install this extension, do the following:
63+
64+
```bash
65+
pip install pyota[ccurl]
66+
```
67+
68+
### Installing the optional module for local proof of work
69+
70+
To do proof of work on your local device without relying on a node,
71+
you can install the [PyOTA-PoW](https://pypi.org/project/PyOTA-PoW/) extension module.
72+
73+
To install this extension, use the following command::
74+
75+
```bash
76+
pip install pyota[pow]
77+
```
78+
79+
When you've installed this module, you can use it by passing the `local_pow=True` argument to your API instance. Doing so will redirect all `attach_to_tangle`
80+
API calls to an interface function in the `pow` package.
81+
82+
### Installing from source
83+
84+
To install the library from the source code on GitHub, do the following:
85+
86+
```bash
87+
# Recommended, but not required
88+
Create virtualenv
89+
git clone https://github.com/iotaledger/iota.py.git
90+
pip install -e .
91+
```
92+
93+
## Getting started
94+
95+
After you've [installing the library](#installation), you can connect to an IRI node to send transactions to it and interact with the ledger.
96+
An extended guide can be found on our [documentation portal](https://docs.iota.org/docs/client-libraries/0.1/getting-started/python-quickstart), we strongly recommend you to go here for starting off. A quick starting tutorial is shown below.
97+
98+
To connect to a local IRI node, you can do the following:
99+
100+
```py
101+
from iota import Iota
102+
103+
# Create a new instance of the IOTA API object
104+
# Specify which node to connect to
105+
api = Iota(adapter = 'https://nodes.devnet.iota.org:443')
106+
107+
# Call the `get_node_info()` method for information about the node and the Tangle
108+
response = api.get_node_info()
109+
110+
print(response)
111+
```
112+
113+
## Examples
114+
115+
You can find an example project in the [examples](https://github.com/iotaledger/iota.py/tree/master/examples) directory.
116+
117+
## Supporting the project
118+
119+
If the IOTA Python client library has been useful to you and you feel like contributing, consider posting a [bug report](https://github.com/iotaledger/iota.py/issues/new-issue), feature request or a [pull request](https://github.com/iotaledger/iota.py/pulls/).
120+
We have some [basic contribution guidelines](CONTRIBUTING.rst) to keep our code base stable and consistent.
121+
122+
### Running test cases
123+
124+
To run test, do the following:
125+
126+
```bash
127+
python setup.py test
128+
```
129+
130+
PyOTA is also compatible with [tox](https://tox.readthedocs.io/), which will run the unit tests in different virtual environments (one for each supported version of Python).
131+
132+
To run the unit tests, it is recommended that you use the `-p` argument.
133+
This speeds up the tests by running them in parallel.
134+
135+
Install PyOTA with the `test-runner` extra to set up the necessary
136+
dependencies, and then you can run the tests with the `tox` command::
137+
138+
```bash
139+
pip install -e .[test-runner]
140+
tox -v -p all
141+
```
142+
143+
### Building the auto-generated documentation
144+
145+
The auto-generated documentation can be generated on your local device by doing the following:
146+
147+
```bash
148+
# Install extra dependencies (you only have to do this once)
149+
pip install .[docs-builder]
150+
cd docs
151+
# Build the documentation::
152+
make html
153+
```
154+
155+
## Joining the discussion
156+
157+
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](https://discord.iota.org/).
File renamed without changes.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
multisig
1414
commands
1515

16-
.. include:: ../README.rst
16+
.. include:: README.rst

iota-python.png

327 KB
Loading

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
##
2222
# Load long description for PyPI.
23-
with open('README.rst', 'r', 'utf-8') as f: # type: StreamReader
23+
with open('docs/README.rst', 'r', 'utf-8') as f: # type: StreamReader
2424
long_description = f.read()
2525

2626
##

0 commit comments

Comments
 (0)