Skip to main content

A connector for the FTP Technologies IMS API

Project description

# ims-python-api-connector

Connector for the FTP Technologies IMS HTTP API

## How to install

`$ pip install ims-api-connector`

## How to use

There are `.connect()` and `.close()` methods exposed as well as a context manager API (`__enter__()` and `__exit__()`) but you don't have to use either- simply calling `.get()`, `.post()` etc will handle the authentication for you.

Additionally, it will retry authentication if it picks up an authentication error during a request (to handle expired tokens etc) but if the attempt to re-authenticate fails, it will stop retrying.

from ims_api_connector import IMSAPIConnector

connector = IMSAPIConnector(
timeout=5, # optional; seconds until a request times out
retries=6, # optional; number of re-auth attempts during a request
backoff=5, # optional; seconds between re-auth attempts
insecure=False, # optional; ignore certificate warnings
logger=None, # optional; Python logger object


Which returns an object like this:

text='{"some": "data"}',
json={'some': 'data'},
error=None, # any JSON parse exception object
traceback=None, # traceback string for JSON parse exception

## How to develop


* pip
* virtualenvwrapper
* entr


* Create a virtualenv
* `mkvirtualenv ims-python-api-connector`
* Install the requirements
* `pip install -r requirements.txt`
* Watch the tests
* ./
* Write some code

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ims-api-connector, version 2018.2
Filename, size File type Python version Upload date Hashes
Filename, size ims_api_connector-2018.2-py3-none-any.whl (6.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ims-api-connector-2018.2.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page