Export Directory external API client.
$ 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
$ git clone https://github.com/uktrade/directory-api-client-external
$ cd directory-api-client-external
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