Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

## [7.5.6](https://pypi.org/project/directory-forms-api-client/7.5.3/) (2026-02-16)
[Full Changelog](http://github.com/uktrade/directory-forms-api-client/pull/59)
## [7.5.7](https://pypi.org/project/directory-forms-api-client/7.5.3/) (2026-02-16)
[Full Changelog](http://github.com/uktrade/directory-forms-api-client/pull/60)
- PLOPS-3455 - Added new get_forms_api_client function
## [7.5.3](https://pypi.org/project/directory-forms-api-client/7.5.3/) (2025-11-12)
[Full Changelog](http://github.com/uktrade/directory-forms-api-client/pull/54)
Expand Down
4 changes: 2 additions & 2 deletions directory_forms_api_client/actions.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import abc

from directory_forms_api_client.client import forms_api_client
from directory_forms_api_client.client import get_forms_api_client


class AbstractAction(abc.ABC):

def __init__(self, form_url, client=forms_api_client, form_session=None, sender=None, spam_control=None):
def __init__(self, form_url, client=get_forms_api_client(), form_session=None, sender=None, spam_control=None):
self.form_url = form_url
self.client = client
self.form_session = form_session
Expand Down
10 changes: 5 additions & 5 deletions directory_forms_api_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def verification_reminders(self, data, authenticator=None):

def _get_required_setting(name: str): # pragma: no cover
if not hasattr(settings, name):
raise ImproperlyConfigured(f'Missing required setting for BG Profile client: {name}')
raise ImproperlyConfigured(f'Missing required setting for Forms API client: {name}')
return getattr(settings, name)


Expand All @@ -74,10 +74,10 @@ def get_forms_api_client() -> APIFormsClient: # pragma: no cover
make testing easier.
"""
# Validate required settings explicitly
base_url = _get_required_setting('BG_PROFILE_BASE_URL')
api_key = _get_required_setting('BG_PROFILE_API_KEY')
sender_id = _get_required_setting('BG_PROFILE_SENDER_ID')
timeout = getattr(settings, 'BG_PROFILE_DEFAULT_TIMEOUT', 10)
base_url = _get_required_setting('DIRECTORY_FORMS_API_BASE_URL')
api_key = _get_required_setting('DIRECTORY_FORMS_API_API_KEY')
sender_id = _get_required_setting('DIRECTORY_FORMS_API_SENDER_ID')
timeout = getattr(settings, 'DIRECTORY_FORMS_API_DEFAULT_TIMEOUT', 10)

return APIFormsClient(
base_url=base_url,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='directory_forms_api_client',
version='7.5.6',
version='7.5.7',
url='https://github.com/uktrade/directory-forms-api-client',
license='MIT',
author='Department for Business and Trade',
Expand Down
Loading