Skip to main content

RecordsKeeper Python library

Project description

RecordsKeeper-python-lib

It is an infrastructure to build RecordsKeeper blockchain-based applications, products and is used to work around applications that are built on top of this blockchain platform.

Note: If you're looking for the RecordsKeeper Python Library please see: RecordsKeeper Python Library

Getting Started

Before you begin you'll need to have python v2 installed. There are several options for installation for python depending on the operating system you are using.

pip install -g RecordsKeeperPythonLib

Import these python libraries first to get started with the library classes and functions.

    import requests
    import json
    from requests.auth import HTTPBasicAuth
    import yaml
    import sys
    import binascii

Creating Connection

Entry point for accessing Address class resources.

Config file to import config parameters:

    with open("config.yaml", 'r') as ymlfile:
        cfg = yaml.load(ymlfile)

Importing chain url and chain name from config file:

  • URL: Url to connect to the chain ([RPC Host]:[RPC Port])
  • Chain-name: chain name
    url = network['url']
    chain = network['chain']

Node Authentication

Importing user name and password values from config file to authenticate the node:

  • User name: The rpc user is used to call the APIs.
  • Password: The rpc password is used to authenticate the APIs.
    user = network['rkuser']
    password = network['passwd']

Libraries

  • Addresses Library to work with RecordsKeeper addresses. You can generate new address, check all addresses, check address validity, check address permissions, check address balance by using Address class. You just have to pass parameters to invoke the pre-defined functions.

  • Assets Library to work with RecordsKeeper assets. You can create new assets and list all assets by using Assets class. You just have to pass parameters to invoke the pre-defined functions.

  • Block Library to work with RecordsKeeper block informaion. You can collect block information by using block class. You just have to pass parameters to invoke the pre-defined functions.

  • Blockchain Library to work with RecordsKeeper block informaion. You can collect block information by using block class. You just have to pass parameters to invoke the pre-defined functions.

  • Permissions Library to work with RecordsKeeper permissions. You can grant and revoke permissions like connect, send, receive, create, issue, mine, activate, admin by using Assets class. You just have to pass parameters to invoke the pre-defined functions.

  • Stream Library to work with RecordsKeeper streams. You can publish, retrieve and verify stream data by using stream class. You just have to pass parameters to invoke the pre-defined functions.

  • Transaction Library to work with RecordsKeeper transactions. You can send transaction, create raw transaction, sign raw transaction, send raw transaction, send signed transaction, retrieve transaction information and calculate transaction's fees by using transaction class. You just have to pass parameters to invoke the pre-defined functions.

  • Wallet Library to work with RecordsKeeper wallet functionalities. You can create wallet, dump wallet into a file, backup wallet into a file, import wallet from a file, lock wallet, unlock wallet, change wallet's password, retrieve private key, retrieve wallet's information, sign and verify message by using wallet class. You just have to pass parameters to invoke the pre-defined functions.

Unit Tests

Under RecordsKeeperPythonLib/test using test data from config.yaml file.

  • To run all the test cases:
python -m unittest discover -v
  • To run a particular test case:
python -m unittest test_name
  • To run test cases with green:
green test_name

Documentation

The complete docs are here: RecordsKeeper python library documentation.

License

Copyright (c) 2016-2018 Recordskeeper License: GNU General Public License version 3, see COPYING

Portions copyright (c) 2014-2017 Coin Sciences Ltd Portions copyright (c) 2009-2016 The Bitcoin Core developers Portions copyright many others - see individual files

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

RecordsKeeperPythonLib-0.2.2.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

RecordsKeeperPythonLib-0.2.2-py2-none-any.whl (22.8 kB view details)

Uploaded Python 2

File details

Details for the file RecordsKeeperPythonLib-0.2.2.tar.gz.

File metadata

  • Download URL: RecordsKeeperPythonLib-0.2.2.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

File hashes

Hashes for RecordsKeeperPythonLib-0.2.2.tar.gz
Algorithm Hash digest
SHA256 78ca04ca593a8a3eb20c791bc055af4c942d9d2aca8a1e9f910c5c12a99b29de
MD5 f3493a4a1005fd2f98770f6ead315fbf
BLAKE2b-256 6bc48c83125a44dc5ae38350f3c444077d708715946854d2f7b113329a8c318b

See more details on using hashes here.

File details

Details for the file RecordsKeeperPythonLib-0.2.2-py2-none-any.whl.

File metadata

  • Download URL: RecordsKeeperPythonLib-0.2.2-py2-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

File hashes

Hashes for RecordsKeeperPythonLib-0.2.2-py2-none-any.whl
Algorithm Hash digest
SHA256 2deffb74d705368476d1cf598047d1223b2ca015ff9f00308af8e087891bc8a3
MD5 630fdf8f8756ab48883938b1c59e635c
BLAKE2b-256 3863294980ebc7f6e6de5297128adfb7ba089605f6fe5bc151ec1aeaf76606ed

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