Skip to content

Commit b90fada

Browse files
committed
Update README
1 parent 16dd3f5 commit b90fada

8 files changed

Lines changed: 21 additions & 23 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ Please see [Examples](https://github.com/Mixnode/mixnode-py-sdk/blob/master/exam
4444

4545
```Python
4646

47-
from mixnode import Mixnode
48-
49-
client = Mixnode("Your api key")
50-
query = "SELECT url, title from homepages LIMIT 10"
51-
response = client.execute(query)
47+
from mixnode import Mixnode, MixnodeError
48+
try:
49+
query = "SELECT url, title from homepages LIMIT 10"
50+
response = Mixnode("Your api key").execute(query)
51+
print(response)
52+
except MixnodeError as error:
53+
print(error)
5254

5355
```
5456

README.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ Quick Start
6464

6565
.. code:: Python
6666
67-
68-
from mixnode import Mixnode
69-
70-
client = Mixnode("Your api key")
71-
query = "SELECT url, title from homepages LIMIT 10"
72-
response = client.execute(query)
67+
from mixnode import Mixnode, MixnodeError
68+
try:
69+
query = "SELECT url, title from homepages LIMIT 10"
70+
response = Mixnode("Your API Key").execute(query)
71+
print(response)
72+
except MixnodeError as error:
73+
print(error)
7374
7475
Mixnode's execute functionality
7576
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

examples/example1.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
# limitations under the License.
1919

2020

21-
from mixnode import Mixnode
22-
from mixnode.error import MixnodeError
23-
import config
21+
from mixnode import Mixnode, MixnodeError
22+
import config
2423

2524
try:
2625
client = Mixnode(config.MIXNODE_CONFIG['api_key'])

examples/example2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
# limitations under the License.
1919

2020

21-
from mixnode import Mixnode
22-
from mixnode.error import MixnodeError
21+
from mixnode import Mixnode, MixnodeError
2322
import config
2423

2524
try:

examples/example3.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
# limitations under the License.
1919

2020

21-
from mixnode import Mixnode
22-
from mixnode.error import MixnodeError
21+
from mixnode import Mixnode, MixnodeError
2322
import config
2423

2524
try:

examples/example4.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
# limitations under the License.
1919

2020

21-
from mixnode import Mixnode
22-
from mixnode.error import MixnodeError
21+
from mixnode import Mixnode, MixnodeError
2322
import config
2423

2524
try:

examples/list-of-websites-using-mediawiki.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
# limitations under the License.
1919

2020

21-
from mixnode import Mixnode
22-
from mixnode.error import MixnodeError
21+
from mixnode import Mixnode, MixnodeError
2322
import config
2423

2524
try:

mixnode/__init__.py

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

3131
__title__ = 'mixnode-py-sdk'
3232
__author__ = 'Mixnode'
33-
__version__ = '1.0.0'
33+
__version__ = '1.0.1'
3434
__license__ = 'Apache 2.0'
3535

3636
from .api_client import Mixnode

0 commit comments

Comments
 (0)