Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

uktrade/directory-api-client-external

Repository files navigation

directory-api-client-external

code-climate-image circle-ci-image codecov-image pypi-image

Export Directory external API client.


Installation

    $ pip install directory-api-external

The api client expects the following settings:

Setting Notes
DIRECTORY_API_CLIENT_EXTERNAL_BASE_URL
DIRECTORY_API_CLIENT_EXTERNAL_API_KEY Unique to client. Retrieved during the on-boarding process.
DIRECTORY_API_CLIENT_EXTERNAL_SENDER_ID Unique to client. Retrieved during the on-boarding process.
DIRECTORY_API_CLIENT_EXTERNAL_DEFAULT_TIMEOUT

Once that is done the API client can be used:

from directory_api_external.client import api_client

Development

$ git clone https://github.com/uktrade/directory-api-client-external
$ cd directory-api-client-external

Publish to PyPI

The package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:

Setting
DIRECTORY_PYPI_USERNAME
DIRECTORY_PYPI_PASSWORD

Then run the following command:

make publish