Skip to main content

Developer SDK for the Taxa Network

Project description

Taxa Network Python SDK

Library used to aid developers in building applications on the Taxa Network. It works with both Python 2.7 and Python 3.5+.

Installation

  1. Download the zip file from Github. Extract into a folder anywhere.

  2. On the command line, navigate to that folder and run the install script: python setup.py install

  3. To enable the SGX's remote attestation feature on your node, follow these instructions to generate a service provider ID (SPID) and primary key:

    python -m taxa_sdk.install_intel_keys [SPID] [primary key]
    
  4. If you are on OSX, you need to install the Apple signed libraries:

sudo python -m taxa_sdk.install_osx_libs

(Note the requirement of sudo)

Documentation

The documentation for this SDK can be found here.

Running tests

To run the tests for this module, run the following commands:

Testing through the WebUI

To test just the attestation process, using the WebUI:

python -m taxa_sdk.tests TestAttestationWebUI

To test the full millionaire test using the WebUI, run this command:

python -m taxa_sdk.tests TestMillionaireByIdentity

Note: If you want to limit your tests to just a WebUI running of a specific server, then modify the FORCEIP variable at the top of taxa_sdk/tests.py. If FORCEIP is set to None (The default), then the node distributer will pick a server for you.

Also note that all tests ran though the WebUI will use the version of taxa_client that comes bundled with the SDK.

Running tests through the command line (bypassing WebUI)

To run the millionaire test via taxa_server via command line, bypassing the WebUI, then use the following command:

python -m taxa_sdk.tests TestBypassWebUI

To just run the attestation via the taxa_server via command line, use this command:

python -m taxa_sdk.tests TestBypassWebUI.test_attestation

Note: you must modify the tests.py file at the top to include the paths to the command line taxa_client and taxa_server to do the BypassWebUI tests.

Testing parameters

There are a few things you can change via the command line. These extra
parameters must be placed before the name of the test classes.

--forceip

python -m taxa_sdk.tests --forceip=13.92.194.125 TestMillionaireByIdentity

This will force the test to run on the node at the passed in IP. If this option is not used, the ip will be gotten from the P2P network.

--nop2p

This will force the IP to be gotten from the node distributor web service instead of the P2P network.

--keepkeys

By default all tests delete their keys after finishing. With this option included, the keys will not be deleted. This means you can run the tests over and over, and it will skip attestation. hence speeding up the tests.

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

taxa-sdk-0.3.2.tar.gz (56.5 MB view details)

Uploaded Source

File details

Details for the file taxa-sdk-0.3.2.tar.gz.

File metadata

  • Download URL: taxa-sdk-0.3.2.tar.gz
  • Upload date:
  • Size: 56.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9

File hashes

Hashes for taxa-sdk-0.3.2.tar.gz
Algorithm Hash digest
SHA256 96aabb65d9f2aa526bd906fc132b6afe906f74b0b235493de5afd361be31ffe4
MD5 4560618abd158fd47758241c3ba8ba00
BLAKE2b-256 d5bc112d20ff206c4fa74d1ff36a1d3df37312322802a5d7a660d38f5f0b50e2

See more details on using hashes here.

Supported by

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