Skip to content
An automatically generated Python client library for Factom Harmony Connect.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.openapi-generator Inital Commit Jan 11, 2019
docs
harmony_connect_client
test
.gitignore
.openapi-generator-ignore
.travis.yml Inital Commit Jan 11, 2019
LICENSE Update LICENSE Mar 21, 2019
README.md
requirements.txt Inital Commit Jan 11, 2019
setup.py
test-requirements.txt
tox.ini

README.md

PyPI version

Factom Harmony Connect - Python Client Library

This is an automatically generated Python client library for Factom Harmony Connect.

Connect is the fastest way to add blockchain capabilities to your app without cryptocurrencies, wallets, or network nodes. Create an account to get your free API key for the sandbox environment.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.17
  • Package version: 1.0.7
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

For more information, please visit https://docs.harmony.factom.com

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

You can install the Harmony Connect client directly from Github using pip

pip install git+https://github.com/FactomProject/factom-harmony-connect-python-client.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/FactomProject/factom-harmony-connect-python-client.git)

You can also install the package hosted on PyPi:

pip install harmony_connect_client

Then import the package:

import harmony_connect_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import harmony_connect_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import harmony_connect_client
from harmony_connect_client.rest import ApiException
from pprint import pprint

configuration = harmony_connect_client.Configuration()
# Configure API key authorization: AppId
configuration.api_key['app_id'] = 'YOUR_API_KEY'

configuration = harmony_connect_client.Configuration()
# Configure API key authorization: AppKey
configuration.api_key['app_key'] = 'YOUR_API_KEY'


# create an instance of the API class
api_instance = harmony_connect_client.ChainsApi(harmony_connect_client.ApiClient(configuration))
chain_id = 285904 # str | Chain identifier

try:
    # Get Chain Info
    api_response = api_instance.get_chain_by_id(chain_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChainsApi->get_chain_by_id: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://connect-shared-sandbox-2445582615332.production.gw.apicast.io/v1

Class Method HTTP request Description
ChainsApi get_chain_by_id GET /chains/{chain_id} Get Chain Info
ChainsApi get_chains GET /chains Get All Chains
ChainsApi post_chain POST /chains Create a Chain
ChainsApi post_chain_search POST /chains/search Search Chains
EntriesApi get_entries_by_chain_id GET /chains/{chain_id}/entries Get Chain's Entries
EntriesApi get_entry_by_hash GET /chains/{chain_id}/entries/{entry_hash} Get Entry Info
EntriesApi get_first_entry GET /chains/{chain_id}/entries/first Get Chain's First Entry
EntriesApi get_last_entry GET /chains/{chain_id}/entries/last Get Chain's Last Entry
EntriesApi post_entries_search POST /chains/{chain_id}/entries/search Search Chain's Entries
EntriesApi post_entry_to_chain_id POST /chains/{chain_id}/entries Create an Entry
InfoApi get_api_info GET / API Info

Documentation For Models

Documentation For Authorization

AppId

  • Type: API key
  • API key parameter name: app_id
  • Location: HTTP header

AppKey

  • Type: API key
  • API key parameter name: app_key
  • Location: HTTP header

Support

For more information, you can view the Connect documentation at https://docs.harmony.factom.com

For additional support, contact us at harmony-support@factom.com

You can’t perform that action at this time.