Skip to content

Commit

Permalink
Release v0.5.0 (#11)
Browse files Browse the repository at this point in the history
* chore: bump version refs to `0.5.0`

* test: limit num. test runner processes to 2

* feat: user-friendly common search method in the API client

* chore(deps): update all dev. + docs deps

* docs: minor tweaks to conf + usage source
  • Loading branch information
sr-murthy authored Jan 14, 2025
1 parent 61379a2 commit defea4f
Show file tree
Hide file tree
Showing 10 changed files with 846 additions and 785 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ and the [CodeQL Analysis YML](https://github.com/sr-murthy/fsrapiclient/blob/mai

## Versioning and Releases

The [PyPI package](https://pypi.org/project/fsrapiclient/) is currently at version `0.4.0`.
The [PyPI package](https://pypi.org/project/fsrapiclient/) is currently at version `0.5.0`.

There is currently no dedicated pipeline for releases - both [GitHub releases](https://github.com/sr-murthy/fsrapiclient/releases) and [PyPI packages](https://pypi.org/project/fsrapiclient) are published manually, but both have the same version tag.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ unittests: clean
--cov=src \
--cov-report=term-missing:skip-covered \
--dist worksteal \
--numprocesses=auto \
--numprocesses=2 \
-ra \
--tb=native \
--verbosity=3 \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

A lightweight Python client library for the UK [Financial Services Register](https://register.fca.org.uk/s/) [RESTful API](https://register.fca.org.uk/Developer/s/).

The [PyPI package](https://pypi.org/project/fsrapiclient) is currently at version `0.4.0`.
The [PyPI package](https://pypi.org/project/fsrapiclient) is currently at version `0.5.0`.

The Financial Services Register, or FS Register, is a **public** database of all firms, individuals, funds, and other entities, that are either currently, or have been previously, authorised and/or regulated by the UK [Financial Conduct Authority (FCA)](https://www.fca.org.uk) and/or the [Prudential Regulation Authority (PRA)](http://bankofengland.co.uk/pra).

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
'networkx': ('https://networkx.org/documentation/stable/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'pdm': ('https://pdm.fming.dev/latest/', None),
'pdm': ('https://pdm-project.org/latest/', None),
'pygraphviz': ('https://pygraphviz.github.io/documentation/stable/', None),
'pytest': ('https://docs.pytest.org/en/7.4.x/', None),
'python': ('https://docs.python.org/3', None),
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fsrapiclient

A lightweight Python client library for the UK `Financial Services Register <https://register.fca.org.uk/s/>`_ `RESTful API <https://register.fca.org.uk/Developer/s/>`_.

The `PyPI package <https://pypi.org/project/fsrapiclient>`_ is currently at version `0.2.1`.
The `PyPI package <https://pypi.org/project/fsrapiclient>`_ is currently at version `0.5.0`.

The Financial Services Register, or FS Register, is a **public** database of all firms, individuals, funds, and other entities, that are either currently, or have been previously, authorised and/or regulated by the UK `Financial Conduct Authority (FCA) <https://www.fca.org.uk>`_ and/or the `Prudential Regulation Authority (PRA) <http://bankofengland.co.uk/pra>`_.

Expand Down
16 changes: 7 additions & 9 deletions docs/sources/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,19 @@ As :py:class:`~fsrapiclient.api.FsrApiResponse` is a subclass of :py:class:`requ
Common Search
=============

The common search endpoint can be used via the :py:meth:`~fsrapiclient.api.FsrApiClient.common_search()` method to make generic queries for firms, individuals, or funds. It requires an URL-encoded parameterised string of the form:
The common search endpoint can be used via the :py:meth:`~fsrapiclient.api.FsrApiClient.common_search()` method to make generic queries for firms, individuals, or funds. It requires two arguments, a resource name (or name substring) to search for, and a resource type which must be one of the following strings: ``"firm"``, ``"individual"``, or ``"fund"``. The method then calls the common search endpoint with a URL-encoded string of the form below:

.. code:: bash
q=resource_name&type=resource_type
where ``q`` is a parameter whose value should be the name (or name substring) of a resource (firm, individual, or fund), and ``type`` is a parameter whose value should be one of ``'firm'``, ``'individual'``, ``'fund'``.

Use :py:func:`urllib.parse.urlencode` to do the URL-encoding. Some examples of common search are given below for Barclays Bank Plc.
Some examples of common search are given below for Barclays Bank Plc.

.. code:: python
from urllib.parse import urlencode
#
>>> res = client.common_search(urlencode({'q': 'barclays bank', 'type': 'firm'}))
>>> res = client.common_search('barclays bank', 'firm')
>>> res
<Response [200]>
>>> res.fsr_data
Expand All @@ -99,21 +97,21 @@ Here are some further examples of common search for firms, individuals and funds

.. code:: python
>>> client.common_search(urlencode({'q': 'revolut bank', 'type': 'firm'})).fsr_data
>>> client.common_search('revolut bank', firm').fsr_data
[{'URL': 'https://register.fca.org.uk/services/V0.1/Firm/833790',
'Status': 'No longer authorised',
'Reference Number': '833790',
'Type of business or Individual': 'Firm',
'Name': 'Revolut Bank UAB'}]
#
>>> client.common_search(urlencode({'q': 'mark carney', 'type': 'individual'})).fsr_data
>>> client.common_search('mark carney', 'individual').fsr_data
[{'URL': 'https://register.fca.org.uk/services/V0.1/Individuals/MXC29012',
'Status': 'Active',
'Reference Number': 'MXC29012',
'Type of business or Individual': 'Individual',
'Name': 'Mark Carney'}]
#
>>> client.common_search(urlencode({'q': 'jupiter asia pacific income', 'type': 'fund'})).fsr_data
>>> client.common_search('jupiter asia pacific income', 'fund').fsr_data
[{'URL': 'https://register.fca.org.uk/services/V0.1/CIS/635641',
'Status': 'Recognised',
'Reference Number': '635641',
Expand All @@ -124,7 +122,7 @@ The response data as stored in the :py:attr:`~fsrapiclient.api.FsrApiResponse.fs
.. code:: python
>>> client.common_search(urlencode({'q': 'natwest', 'type': 'individual'})).fsr_data
>>> client.common_search('natwest', 'individual').fsr_data
# Null
.. _usage.regulated-markets:
Expand Down
Loading

0 comments on commit defea4f

Please sign in to comment.