Skip to main content

Package with default calls for the SigningHub API

Project description

Description

SigningHub is a platform which is mainly used to sign documents with a digital or electronic signature. On SigningHub, documents, users and settings can be uploaded and managed through the web view, as well as through the API. This package focusses on the usage of said API through Python.

Signinghubapi package is the python integration of the SigningHub API. Most of the SigningHub API calls have been translated to python.

SigningHub API guide can be found here.

Both API v3 (SigningHub 7.7.9 and earlier) and API v4 (SigningHub 7.7.9 and above) have been integrated.

Dependencies

Imported Modules

This Python package depends on 1 external module: requests

Requests on PyPI

Requests on GitHub

Default Modules

Default Python modules this package depends on: json

Usage

Install this package with the command pip install signinghubapi.

This package can be used to create a Connection object which connects to SigningHub.

Required parameters are:

  • A URL;

Optional parameters are:

  • An API connector client ID (Default value = None);
  • An API connector client secret (Default value = None);
  • A username (email address) to authenticate with (Default value = None);
  • A password to authenticate with (Default value = None);
  • A scope to authenticate with (Default value = None);
  • An access token (Default value = None);
  • A refresh token (Default value = None);
  • An API version (3 or 4, depending on your SigningHub version. Default value = 3);
  • An API port (if the API URL is not defined as a URL. Default value = None).

This object can execute the calls which are found in the API guide. These calls are translated to Python and the requests.models.Response object will be returned each time.

The validity of the provided URL can be tested with an about_signinghub() call. This call only requires the provided URL to work.

Authentication

Authentication through API always need an API connector. An API connector consists of a Client ID and a Client Secret. Thus, the parameters client_id and client_secret should be provided to the Connection object.

Authentication with username and password

Authentication through username and password can be achieved by settings the following parameters by the Connection object:

  • Username (email address)
  • Password

A bearer token will be received upon authentication, which will be automatically added to future calls with this object.

Example

>>> from signinghubapi.signinghubapi import Connection
>>> conn = Connection(url='https://api.signinghub.com/', client_id='testclientid', client_secret='testclientsecret', username='test@email.com', password='1234')
>>> authentication = conn.authenticate()
>>> authentication.status_code
200
>>> authentication.text
'{"access_token":"LPAGaUoJ71Wi53vngCMty8i...'

Authentication with refresh token

Upon successful authentication with username and password, a refresh token is returned aside from the access token. This refresh token can be used to authenticate with in future calls.

Example

>>> from signinghubapi.signinghubapi import Connection
>>> conn = Connection(url='https://api.signinghub.com/', client_id='testclientid', client_secret='testclientsecret', refresh_token='"QUVTMjU2LUdDTWLsQS+ByQscK...')
>>> authentication_with_refresh = conn.authenticate_with_refresh_token()
>>> authentication_with_refresh.status_code
200
>>> authentication_with_refresh.text
'{"access_token":"HTPk17blIEcjKIC_XCGe3cy4_kNCwp...'

URL check example

>>> from signinghubapi.signinghubapi import Connection
>>> conn = Connection(url='https://api.signinghub.com/')
>>> about = conn.about_signinghub()
>>> about.status_code
200
>>> about.text
'{"installation_name":"SigningHub","version":"7.7.8.26","build":"778...'

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

signinghubapi-0.1.4.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

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

signinghubapi-0.1.4-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file signinghubapi-0.1.4.tar.gz.

File metadata

  • Download URL: signinghubapi-0.1.4.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for signinghubapi-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5289ade22078cba9126a8cdf8b2f54b02d391f09ba894d1c0a8192c9d62ba09c
MD5 dbf4214673fb89fee00cd5502a6deb96
BLAKE2b-256 aa3943111d5b44759ff11b4d1ad5b1bf0b66a6e8aab9110b80f791d664ddf4e1

See more details on using hashes here.

File details

Details for the file signinghubapi-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: signinghubapi-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for signinghubapi-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a14cdbb989e029828de843e2b9906bad29c38ad0cadc869f94c704cda3f425d3
MD5 1f80ca712a5e5c5359edd0a7e23fc431
BLAKE2b-256 71c1e0570e60b1d5e11b88b71f6d12ecf5d7f584f5f68b978cce2e3a006af5e9

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